diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:59:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-28 14:59:28 -0700 |
commit | 92cdfd21313c5bf5657d4ac2d3e6ae7af7e9ce94 (patch) | |
tree | 1ee5bd8057292fc6dfa9edc58b3c2cc7b990f8ab /builtin/blame.c | |
parent | f2df3104ce45bc1ee6d7c16f3a02f1d157c65e07 (diff) | |
parent | 83c4d380171a2ecd24dd2e04072692ec54a7aaa5 (diff) | |
download | git-92cdfd21313c5bf5657d4ac2d3e6ae7af7e9ce94.tar.gz |
Merge branch 'jk/xdiff-memory-limits' into maint-2.3
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 2b1f9dd6cd..66b4fbf466 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -972,7 +972,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; @@ -1118,7 +1121,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); } |