diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-05 12:46:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-05 13:20:08 -0700 |
commit | 590f6e4235a7d44ad39511186ca8bbac02ae8c2e (patch) | |
tree | 6999a9512d87bbc06dfb3308fdc824e5226e7597 /builtin/blame.c | |
parent | e13d854322ad802213aea13409505c765b5c68d1 (diff) | |
parent | 22f698cb188243b313e024d618283e0293e37140 (diff) | |
download | git-590f6e4235a7d44ad39511186ca8bbac02ae8c2e.tar.gz |
Sync with 2.6.1
Diffstat (limited to 'builtin/blame.c')
-rw-r--r-- | builtin/blame.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 01ea770787..203a981cd0 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -974,7 +974,10 @@ static void pass_blame_to_parent(struct scoreboard *sb, fill_origin_blob(&sb->revs->diffopt, target, &file_o); num_get_patch++; - diff_hunks(&file_p, &file_o, 0, blame_chunk_cb, &d); + if (diff_hunks(&file_p, &file_o, 0, blame_chunk_cb, &d)) + die("unable to generate diff (%s -> %s)", + sha1_to_hex(parent->commit->object.sha1), + sha1_to_hex(target->commit->object.sha1)); /* The rest are the same as the parent */ blame_chunk(&d.dstq, &d.srcq, INT_MAX, d.offset, INT_MAX, parent); *d.dstq = NULL; @@ -1120,7 +1123,9 @@ static void find_copy_in_blob(struct scoreboard *sb, * file_p partially may match that image. */ memset(split, 0, sizeof(struct blame_entry [3])); - diff_hunks(file_p, &file_o, 1, handle_split_cb, &d); + if (diff_hunks(file_p, &file_o, 1, handle_split_cb, &d)) + die("unable to generate diff (%s)", + sha1_to_hex(parent->commit->object.sha1)); /* remainder, if any, all match the preimage */ handle_split(sb, ent, d.tlno, d.plno, ent->num_lines, parent, split); } |