summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-03-11 22:36:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-11 23:02:13 (GMT)
commit4b0d1eebe95b8ed187ff06ae46d69d517c2b759f (patch)
tree536967c182e91467d968b3076c1f70c1e1fd222b /cache.h
parentab5d01a29eb7380ceab070f0807c2939849c44bc (diff)
downloadgit-4b0d1eebe95b8ed187ff06ae46d69d517c2b759f.zip
git-4b0d1eebe95b8ed187ff06ae46d69d517c2b759f.tar.gz
git-4b0d1eebe95b8ed187ff06ae46d69d517c2b759f.tar.bz2
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index b829410..02e38d1 100644
--- a/cache.h
+++ b/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