Add a place for (not) sharing stuff between worktrees
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index a7a75b4cc0b9b93ec3a56340a711900c76b506ce..1bc4ed301bcb3068d2aab84333f1a7c50fa24821 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -624,6 +624,7 @@ int dwim_log(const char *str, int len, struct object_id *oid, char **log)
 static int is_per_worktree_ref(const char *refname)
 {
        return !strcmp(refname, "HEAD") ||
+               starts_with(refname, "refs/worktree/") ||
                starts_with(refname, "refs/bisect/") ||
                starts_with(refname, "refs/rewritten/");
 }
@@ -646,7 +647,7 @@ enum ref_type ref_type(const char *refname)
                return REF_TYPE_PER_WORKTREE;
        if (is_pseudoref_syntax(refname))
                return REF_TYPE_PSEUDOREF;
-       return REF_TYPE_NORMAL;
+       return REF_TYPE_NORMAL;
 }
 
 long get_files_ref_lock_timeout_ms(void)