SVN import: Use one log call
[gitweb.git] / path.c
diff --git a/path.c b/path.c
index 84b3272d94dbc301131d55660be41d5150a1cdef..2c077c0c8f7066c5338050ce890c0846adedf6bd 100644 (file)
--- 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();
        }