summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-07-03 10:01:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-09 16:42:22 -0700
commitda3ac0c14993c5e8e41875cc3ead32be71647a7a (patch)
tree051d70fc773165ff5120725910b69bbe89c7e872 /builtin/apply.c
parentsha1_name.c: add support for disambiguating other types (diff)
downloadtgif-da3ac0c14993c5e8e41875cc3ead32be71647a7a.tar.xz
apply: --build-fake-ancestor expects blobs
The "index" line read from the patch to reconstruct a partial preimage tree records the object names of blob objects. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index c24dc546d0..8b2db1d76b 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -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))