diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-02-22 20:17:37 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-02-24 09:33:27 -0800 |
| commit | cfe3917c85f38c3367de7b6f5838ecaf6d1e148d (patch) | |
| tree | 154e3c9ae4054961396971c09a36512c8c4d559a /builtin/init-db.c | |
| parent | t/helper: make repository tests hash independent (diff) | |
| download | git-cfe3917c85f38c3367de7b6f5838ecaf6d1e148d.tar.gz 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 'builtin/init-db.c')
| -rw-r--r-- | builtin/init-db.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/init-db.c b/builtin/init-db.c index 944ec77fe1..b11f07064d 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -378,7 +378,7 @@ int init_db(const char *git_dir, const char *real_git_dir, * config file, so this will not fail. What we are catching * is an attempt to reinitialize new repository with an old tool. */ - check_repository_format(); + check_repository_format(NULL); reinit = create_default_files(template_dir, original_git_dir); |
