diff options
author | Thomas Rast <trast@student.ethz.ch> | 2013-02-26 21:47:01 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-26 13:01:34 -0800 |
commit | dd281f09b7eab86e4983b37d011cbfb0f593f6b8 (patch) | |
tree | 3e1149754a47b97d47407c049d3a1f50fd8f8e1a /t/t4001-diff-rename.sh | |
parent | d020e27fdaeb7d04247cdf5a0ff84d97626d5f5a (diff) | |
download | git-dd281f09b7eab86e4983b37d011cbfb0f593f6b8.tar.gz |
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/t4001-diff-rename.sh')
0 files changed, 0 insertions, 0 deletions