diff options
author | Thomas Rast <trast@student.ethz.ch> | 2010-04-15 14:59:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-17 10:23:59 -0700 |
commit | 21798708031ed808cb77232e771e20d3146cf9c8 (patch) | |
tree | c39d7292d74eca74f919a5195772278978688077 /diffcore-rename.c | |
parent | Document new "already-merged" rule for branch -d (diff) | |
download | tgif-21798708031ed808cb77232e771e20d3146cf9c8.tar.xz |
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à <desarrollo@gestiweb.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-rename.c')
0 files changed, 0 insertions, 0 deletions