diff options
author | Antoine Pelisse <apelisse@gmail.com> | 2013-02-23 17:48:45 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-23 23:52:39 -0800 |
commit | d020e27fdaeb7d04247cdf5a0ff84d97626d5f5a (patch) | |
tree | 9d6a52c0617701b333bad6c68303977c19cd78f7 /graph.c | |
parent | Git 1.7.6.6 (diff) | |
download | tgif-d020e27fdaeb7d04247cdf5a0ff84d97626d5f5a.tar.xz |
diff: Fix rename pretty-print when suffix and prefix overlap
When considering a rename for two files that have a suffix and a prefix
that can overlap, a confusing line is shown. As an example, renaming
"a/b/b/c" to "a/b/c" shows "a/b/{ => }/b/c".
Currently, what we do is calculate the common prefix ("a/b/"), and the
common suffix ("/b/c"), but the same "/b/" is actually counted both in
prefix and suffix. Then when calculating the size of the non-common part,
we end-up with a negative value which is reset to 0, thus the "{ => }".
Do not allow the common suffix to overlap the common prefix and stop
when reaching a "/" that would be in both.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
0 files changed, 0 insertions, 0 deletions