Merge branch 'jk/maint-http-half-auth-push' into maint-1.7.11
[gitweb.git] / sha1_name.c
index c6331136d19c5224078fa78b6e5e794fcc587fe2..5d81ea0564c8d90b417eb8ec5ed8c32baa2c3ea3 100644 (file)
@@ -1127,7 +1127,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
                        if (new_filename)
                                filename = new_filename;
                        ret = get_tree_entry(tree_sha1, filename, sha1, &oc->mode);
-                       if (only_to_die) {
+                       if (ret && only_to_die) {
                                diagnose_invalid_sha1_path(prefix, filename,
                                                           tree_sha1, object_name);
                                free(object_name);