apply: --build-fake-ancestor expects blobs
[gitweb.git] / builtin / apply.c
index c24dc546d0cc3f223c40c12aa20dc75eff13d4f9..8b2db1d76b60638e706c12f0cdfb264f089f0588 100644 (file)
@@ -3203,7 +3203,7 @@ static void build_fake_ancestor(struct patch *list, const char *filename)
                name = patch->old_name ? patch->old_name : patch->new_name;
                if (0 < patch->is_new)
                        continue;
-               else if (get_sha1(patch->old_sha1_prefix, sha1))
+               else if (get_sha1_blob(patch->old_sha1_prefix, sha1))
                        /* git diff has no index line for mode/type changes */
                        if (!patch->lines_added && !patch->lines_deleted) {
                                if (get_current_sha1(patch->old_name, sha1))