summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2010-04-15 12:59:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-17 17:23:59 (GMT)
commit21798708031ed808cb77232e771e20d3146cf9c8 (patch)
treec39d7292d74eca74f919a5195772278978688077 /git-stash.sh
parentfff0d0abdde6729606824688c2acac72db643e65 (diff)
downloadgit-21798708031ed808cb77232e771e20d3146cf9c8.zip
git-21798708031ed808cb77232e771e20d3146cf9c8.tar.gz
git-21798708031ed808cb77232e771e20d3146cf9c8.tar.bz2
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 'git-stash.sh')
0 files changed, 0 insertions, 0 deletions