X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=path.c;h=2c077c0c8f7066c5338050ce890c0846adedf6bd;hb=4e72dcec89c7cda7022d4ec2dd686e77deb5376e;hp=84b3272d94dbc301131d55660be41d5150a1cdef;hpb=bd22c904a0f1c88a3a7bfa96bbf690de2f5cb278;p=git.git diff --git a/path.c b/path.c index 84b3272d..2c077c0c 100644 --- a/path.c +++ b/path.c @@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict) return NULL; if (strict) { - if((path[0] != '/') || chdir(path) < 0) + if (chdir(path) < 0) return NULL; } else { @@ -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(); }