1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-08 07:46:48 +02:00

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>
This commit is contained in:
Junio C Hamano 2005-11-25 10:48:26 -08:00
parent ab9cb76f66
commit 1644162ad5

1
path.c
View File

@ -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();
}