Remove extra '-' from git-am(1)
[gitweb.git] / sha1_name.c
index 44bb62d270739a232e87c90c05ce89fcc86bc15b..9677afdadb337fd8d4f69307aebe8b0186a4e7c8 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);