Check repository format version in enter_repo().
authorJunio C Hamano <junkio@cox.net>
Fri, 25 Nov 2005 18:48:26 +0000 (10:48 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 27 Nov 2005 09:32:59 +0000 (01:32 -0800)
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>
path.c

diff --git a/path.c b/path.c
index 4d88947..2c077c0 100644 (file)
--- 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();
        }