mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
setup: document check_repository_format()
This function's interface is rather enigmatic, so let's document it further. While we're here, let's also drop the return value. It will always either be "0" or the function will die (consequently, neither of its two callers bothered to check the return). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ab5d01a29e
commit
4b0d1eebe9
9
cache.h
9
cache.h
@ -747,7 +747,14 @@ extern int grafts_replace_parents;
|
||||
#define GIT_REPO_VERSION_READ 1
|
||||
extern int repository_format_version;
|
||||
extern int repository_format_precious_objects;
|
||||
extern int check_repository_format(void);
|
||||
|
||||
/*
|
||||
* Check the repository format version in the path found in get_git_dir(),
|
||||
* 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?".
|
||||
*/
|
||||
extern void check_repository_format(void);
|
||||
|
||||
#define MTIME_CHANGED 0x0001
|
||||
#define CTIME_CHANGED 0x0002
|
||||
|
4
setup.c
4
setup.c
@ -982,9 +982,9 @@ int check_repository_format_version(const char *var, const char *value, void *cb
|
||||
return 0;
|
||||
}
|
||||
|
||||
int check_repository_format(void)
|
||||
void check_repository_format(void)
|
||||
{
|
||||
return check_repository_format_gently(get_git_dir(), NULL);
|
||||
check_repository_format_gently(get_git_dir(), NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user