summaryrefslogtreecommitdiff
path: root/t/t4034/perl/pre
diff options
context:
space:
mode:
authorLibravatar Thomas Rast <trast@student.ethz.ch>2013-02-26 21:47:01 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-02-26 13:01:34 -0800
commitdd281f09b7eab86e4983b37d011cbfb0f593f6b8 (patch)
tree3e1149754a47b97d47407c049d3a1f50fd8f8e1a /t/t4034/perl/pre
parentdiff: Fix rename pretty-print when suffix and prefix overlap (diff)
downloadtgif-dd281f09b7eab86e4983b37d011cbfb0f593f6b8.tar.xz
diff: prevent pprint_rename from underrunning input
The logic described in d020e27 (diff: Fix rename pretty-print when suffix and prefix overlap, 2013-02-23) is wrong: The proof in the comment is valid only if both strings are the same length. *One* of old/new can reach a-1 (b-1, resp.) if 'a' is a suffix of 'b' (or vice versa). Since the intent was to let the loop run down to the '/' at the end of the common prefix, fix it by making that distinction explicit: if there is no prefix, allow no underrun. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4034/perl/pre')
0 files changed, 0 insertions, 0 deletions