Skip to content

Commit

Permalink
Make HEAD a PSEUDOREF rather than PER_WORKTREE.
Browse files Browse the repository at this point in the history
This is consistent with the definition of REF_TYPE_PSEUDOREF
(uppercase in the root ref namespace).

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
hanwen authored and gitster committed Jul 27, 2020
1 parent 0974341 commit 55dd8b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,9 @@ 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/");
return starts_with(refname, "refs/worktree/") ||
starts_with(refname, "refs/bisect/") ||
starts_with(refname, "refs/rewritten/");
}

static int is_pseudoref_syntax(const char *refname)
Expand Down

0 comments on commit 55dd8b9

Please sign in to comment.