diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-02-22 21:17:37 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-24 18:33:27 +0100 |
commit | cfe3917c85f38c3367de7b6f5838ecaf6d1e148d (patch) | |
tree | 154e3c9ae4054961396971c09a36512c8c4d559a /cache.h | |
parent | t/helper: make repository tests hash independent (diff) | |
download | git-cfe3917c85f38c3367de7b6f5838ecaf6d1e148d.tar.xz git-cfe3917c85f38c3367de7b6f5838ecaf6d1e148d.zip |
setup: allow check_repository_format to read repository format
In some cases, we will want to not only check the repository format, but
extract the information that we've gained. To do so, allow
check_repository_format to take a pointer to struct repository_format.
Allow passing NULL for this argument if we're not interested in the
information, and pass NULL for all existing callers. A future patch
will make use of this information.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1086,8 +1086,10 @@ int verify_repository_format(const struct repository_format *format, * and die if it is a version we don't understand. Generally one would * set_git_dir() before calling this, and use it only for "are we in a valid * repo?". + * + * If successful and fmt is not NULL, fill fmt with data. */ -void check_repository_format(void); +void check_repository_format(struct repository_format *fmt); #define MTIME_CHANGED 0x0001 #define CTIME_CHANGED 0x0002 |