describe: Break annotated tag ties by tagger date
[gitweb.git] / sha1_name.c
index 04fb3b8fed2970bf7fde83e0dc38cea9485ca3d2..7013c53ca6f083b6887f2d8567c72c5a63054c1c 100644 (file)
@@ -278,8 +278,7 @@ 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) &&
-                          (len != 4 || strcmp(str, "HEAD")))
+               } else if ((flag & REF_ISSYMREF) && strcmp(fullref, "HEAD"))
                        warning("ignoring dangling symref %s.", fullref);
        }
        free(last_branch);