]> Pileus Git - ~andy/git/blobdiff - sha1_name.c
Makefile: Fix compilation of Windows resource file
[~andy/git] / sha1_name.c
index b1873d8113bdeb0ff8087319c99833036aaffe1b..a5578f718ea092338eb16fbe7dbf867a98e82218 100644 (file)
@@ -451,9 +451,9 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
        int at, reflog_len, nth_prior = 0;
 
        if (len == 40 && !get_sha1_hex(str, sha1)) {
-               if (warn_on_object_refname_ambiguity) {
+               if (warn_ambiguous_refs && warn_on_object_refname_ambiguity) {
                        refs_found = dwim_ref(str, len, tmp_sha1, &real_ref);
-                       if (refs_found > 0 && warn_ambiguous_refs) {
+                       if (refs_found > 0) {
                                warning(warn_msg, len, str);
                                if (advice_object_name_warning)
                                        fprintf(stderr, "%s\n", _(object_name_msg));