Skip to content

Commit 55dd8b9

Browse files
hanwengitster
authored andcommitted
Make HEAD a PSEUDOREF rather than PER_WORKTREE.
This is consistent with the definition of REF_TYPE_PSEUDOREF (uppercase in the root ref namespace). Signed-off-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0974341 commit 55dd8b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

refs.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,9 @@ int dwim_log(const char *str, int len, struct object_id *oid, char **log)
676676

677677
static int is_per_worktree_ref(const char *refname)
678678
{
679-
return !strcmp(refname, "HEAD") ||
680-
starts_with(refname, "refs/worktree/") ||
681-
starts_with(refname, "refs/bisect/") ||
682-
starts_with(refname, "refs/rewritten/");
679+
return starts_with(refname, "refs/worktree/") ||
680+
starts_with(refname, "refs/bisect/") ||
681+
starts_with(refname, "refs/rewritten/");
683682
}
684683

685684
static int is_pseudoref_syntax(const char *refname)

0 commit comments

Comments
 (0)