Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-07-27 19:25:47 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-27 20:06:49 +0300
commit55dd8b9108679da122d2c69fda3b9413651af4d7 (patch)
treefe38a72e2e487471ea5fb574caab4e627c16c418 /refs.c
parent09743417a201511888aee42480e468ebf47fcecb (diff)
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 <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/refs.c b/refs.c
index 0be6bf6d2b..605163c569 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)