path: root/
diff options
authorThomas Rast <>2010-04-15 12:59:37 (GMT)
committerJunio C Hamano <>2010-04-17 17:23:59 (GMT)
commit21798708031ed808cb77232e771e20d3146cf9c8 (patch)
treec39d7292d74eca74f919a5195772278978688077 /
parentfff0d0abdde6729606824688c2acac72db643e65 (diff)
combined diff: correctly handle truncated file
Consider an evil merge of two commits A and B, both of which have a file 'foo', but the merge result does not have that file. The combined-diff code learned in 4462731 (combine-diff: do not punt on removed or added files., 2006-02-06) to concisely show only the removal, since that is the evil part and the previous contents are presumably uninteresting. However, to diagnose an empty merge result, it overloaded the variable that holds the file's length. This means that the check also triggers for truncated files. Consequently, such files were not shown in the diff at all despite the merge being clearly evil. Fix this by adding a new variable that distinguishes whether the file was deleted (which is the case 4462731 handled) or truncated. In the truncated case, we show the full combined diff again, which is rather spammy but at least does not hide the evilness. Reported-by: David Martínez Martí <> Signed-off-by: Thomas Rast <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions