diff options
-rw-r--r-- | sha1_name.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index 3bd2ef0e7c..2f75179f4c 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -278,7 +278,8 @@ int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref) *ref = xstrdup(r); if (!warn_ambiguous_refs) break; - } else if (flag & REF_ISSYMREF) + } else if ((flag & REF_ISSYMREF) && + (len != 4 || strcmp(str, "HEAD"))) warning("ignoring dangling symref %s.", fullref); } free(last_branch); |