[PATCH 2/2] Make HEAD a PSEUDOREF rather than PER_WORKTREE.
- From
Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jul 6, 2020, 17:29 UTC
- Message-ID
- <470821dc6d4b72c6414b3458883277ad36952892.1594056572.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.673.git.1594056572.gitgitgadget@gmail.com>
From: Han-Wen Nienhuys <hanwen@google.com>
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> --- refs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c index a2fd42364f..265767a234 100644 --- a/refs.c +++ b/refs.c @@ -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)
-- gitgitgadget