diff options
author | Yoshioka Tsuneo <yoshiokatsuneo@gmail.com> | 2013-10-18 12:35:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-18 12:59:58 -0700 |
commit | a111a2b742a561e8c93c66892fc10476e7bbd0c8 (patch) | |
tree | d0ae8309069c9255baa48e29be58307b8a7a301e /t/t6101-rev-parse-parents.sh | |
parent | c5f424fd014488bd8a92b97f52bfe47823bc2128 (diff) | |
download | git-a111a2b742a561e8c93c66892fc10476e7bbd0c8.tar.gz |
diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible
"git diff -M --stat" can detect rename and show renamed file name like
"foofoofoo => barbarbar".
Before this commit, this output is shortened always by omitting left most
part like "...foo => barbarbar". So, if the destination filename is too long,
source filename putting left or arrow can be totally omitted like
"...barbarbar", without including any of "foofoofoo =>".
In such a case where arrow symbol is omitted, there is no way to know
whether the file is renamed or existed in the original.
Make sure there is always an arrow, like "...foo => ...bar".
The output can contain curly braces('{','}') for grouping.
So, in general, the output format is "<pfx>{<mid_a> => <mid_b>}<sfx>"
To keep arrow("=>"), try to omit <pfx> as long as possible at first
because later part or changing part will be the more important part.
If it is not enough, shorten <mid_a>, <mid_b> trying to have the same
maximum length.
If it is not enough yet, omit <sfx>.
Signed-off-by: Tsuneo Yoshioka <yoshiokatsuneo@gmail.com>
Test-added-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6101-rev-parse-parents.sh')
0 files changed, 0 insertions, 0 deletions