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:

committed by
Junio C Hamano

parent
bf154a8782
commit
cfe3917c85
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user