Merge branch 'tz/git-svn-doc-markup-fix'
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index ad30a5a46dd8d902874d3c3185f905c13a18ba7f..0a3ddcf2bc39daf88b6d3630360927610191f545 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -1466,9 +1466,11 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
                        return path_none;
                }
                if (!(dir->flags & DIR_NO_GITLINKS)) {
-                       struct object_id oid;
-                       if (resolve_gitlink_ref(dirname, "HEAD", &oid) == 0)
+                       struct strbuf sb = STRBUF_INIT;
+                       strbuf_addstr(&sb, dirname);
+                       if (is_nonbare_repository_dir(&sb))
                                return exclude ? path_excluded : path_untracked;
+                       strbuf_release(&sb);
                }
                return path_recurse;
        }