summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-25 18:48:26 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-27 09:32:59 (GMT)
commit1644162ad53da1d0107c5c45c866e75ef95660bb (patch)
tree38d3ce153b14ab4561c2f48f30ce601b8933cc53 /path.c
parentab9cb76f661c1794800361c27bc5a515245aaaef (diff)
downloadgit-1644162ad53da1d0107c5c45c866e75ef95660bb.zip
git-1644162ad53da1d0107c5c45c866e75ef95660bb.tar.gz
git-1644162ad53da1d0107c5c45c866e75ef95660bb.tar.bz2
Check repository format version in enter_repo().
After daemon, upload-pack and receive-pack find out where the git directory is and chdir() there, make sure that repository is in a format we understand, after putenv("GIT_DIR=.") so that it knows to pick up the configuration file from there. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'path.c')
-rw-r--r--path.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/path.c b/path.c
index 4d88947..2c077c0 100644
--- a/path.c
+++ b/path.c
@@ -199,6 +199,7 @@ char *enter_repo(char *path, int strict)
if(access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_symref("HEAD") == 0) {
putenv("GIT_DIR=.");
+ check_repository_format();
return current_dir();
}