]> gitweb.ps.run Git - ps-cgit/blobdiff - scan-tree.c
scan-tree: detect non-bare repository and stop scanning early
[ps-cgit] / scan-tree.c
index 4da21a4cefe20aebac1498f24e39a5f64a4d70d4..67f4550ef8e0eec247527073c4fe7f670ba5f733 100644 (file)
@@ -89,6 +89,10 @@ static void scan_path(const char *base, const char *path)
                add_repo(base, path);
                return;
        }
+       if (is_git_dir(fmt("%s/.git", path))) {
+               add_repo(base, fmt("%s/.git", path));
+               return;
+       }
        dir = opendir(path);
        if (!dir) {
                fprintf(stderr, "Error opening directory %s: %s (%d)\n",