gitweb: Check git base URLs before generating URL from it
[gitweb.git] / describe.c
index 5dd8b2e3977a2ff724ca208621f76a898cff0389..ab192f83ae27c5e0bf3f2a5f61684d0dc66deb32 100644 (file)
@@ -161,7 +161,9 @@ int main(int argc, char **argv)
                        usage(describe_usage);
        }
 
-       if (i == argc)
+       setup_git_directory();
+
+       if (argc <= i)
                describe("HEAD", 1);
        else
                while (i < argc) {