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>
This commit is contained in:
brian m. carlson
2020-02-22 20:17:37 +00:00
committed by Junio C Hamano
parent bf154a8782
commit cfe3917c85
4 changed files with 9 additions and 5 deletions

2
path.c
View File

@ -851,7 +851,7 @@ const char *enter_repo(const char *path, int strict)
if (is_git_directory(".")) {
set_git_dir(".");
check_repository_format();
check_repository_format(NULL);
return path;
}