This website requires JavaScript.
Explore
Help
Sign in
mirrors
/
git
Watch
1
Star
0
Fork
You've already forked git
0
mirror of
https://github.com/git/git.git
synced
2024-11-15 21:53:44 +01:00
Code
Activity
2d4c993392
git
/
t
/
t4013
/
diff.diff_--dirstat_initial_rearrange
4 lines
54 B
Text
Raw
Normal View
History
Unescape
Escape
--dirstat: Describe non-obvious differences relative to --stat or regular diff Also add a testcase documenting the current behavior. Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11 00:48:50 +02:00
$ git diff --dirstat initial rearrange
Teach --dirstat not to completely ignore rearranged lines within a file Currently, the --dirstat analysis ignores when lines within a file are rearranged, because the "damage" calculated by show_dirstat() is 0. However, if the object name has changed, we already know that there is some damage, and it is unintuitive to claim there is _no_ damage. Teach show_dirstat() to assign a minimum amount of damage (== 1) to entries for which the analysis otherwise yields zero damage, to still represent that these files are changed, instead of saying that there is no change. Also, skip --dirstat analysis when the object names are the same (e.g. for a pure file rename). Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11 00:48:52 +02:00
100.0% dir/
--dirstat: Describe non-obvious differences relative to --stat or regular diff Also add a testcase documenting the current behavior. Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-11 00:48:50 +02:00
$
Copy permalink