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>

Jeff King committed Mar 11, 2016 at 17:36 UTC 4b0d1eebe95b8ed187ff06ae46d69d517c2b759f
2 files changed +10 -3
cache.h
+8 -1
@@ -747,7 +747,14 @@ extern int grafts_replace_parents;
747 #define GIT_REPO_VERSION_READ 1
748 extern int repository_format_version;
749 extern int repository_format_precious_objects;
750 -extern int check_repository_format(void);
750 +
751 +/*
752 + * Check the repository format version in the path found in get_git_dir(),
753 + * and die if it is a version we don't understand. Generally one would
754 + * set_git_dir() before calling this, and use it only for "are we in a valid
755 + * repo?".
756 + */
757 +extern void check_repository_format(void);
758
759 #define MTIME_CHANGED 0x0001
760 #define CTIME_CHANGED 0x0002
setup.c
+2 -2
@@ -982,9 +982,9 @@ int check_repository_format_version(const char *var, const char *value, void *cb
982 return 0;
983 }
984
985 -int check_repository_format(void)
985 +void check_repository_format(void)
986 {
987 - return check_repository_format_gently(get_git_dir(), NULL);
987 + check_repository_format_gently(get_git_dir(), NULL);
988 }
989
990 /*