diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-06 15:02:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-06 15:02:29 -0800 |
commit | b6488fe191c3bff0dee39cfd2a7082dd52159c47 (patch) | |
tree | 53084ec8cdbc7d2d5bb0d9ae5dce23c5359ee122 /t | |
parent | 79de649c0f452c0366a7306819f10760f4ed8b92 (diff) | |
parent | ab27389affc78a521fe44fc25518e1d11a4fc433 (diff) | |
download | git-b6488fe191c3bff0dee39cfd2a7082dd52159c47.tar.gz |
Merge branch 'mk/diff-shortstat-dirstat-fix'
"git diff --shortstat --dirstat=changes" showed a dirstat based on
lines that was never asked by the end user in addition to the
dirstat that the user asked for.
* mk/diff-shortstat-dirstat-fix:
diff --shortstat --dirstat: remove duplicate output
Diffstat (limited to 't')
-rwxr-xr-x | t/t4047-diff-dirstat.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4047-diff-dirstat.sh b/t/t4047-diff-dirstat.sh index ed7e093366..0d50dce97e 100755 --- a/t/t4047-diff-dirstat.sh +++ b/t/t4047-diff-dirstat.sh @@ -973,4 +973,18 @@ test_expect_success 'diff.dirstat=future_param,0,lines should warn, but still wo test_i18ngrep -q "diff\\.dirstat" actual_error ' +test_expect_success '--shortstat --dirstat should output only one dirstat' ' + git diff --shortstat --dirstat=changes HEAD^..HEAD >out && + grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_changes && + test_line_count = 1 actual_diff_shortstat_dirstat_changes && + + git diff --shortstat --dirstat=lines HEAD^..HEAD >out && + grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_lines && + test_line_count = 1 actual_diff_shortstat_dirstat_lines && + + git diff --shortstat --dirstat=files HEAD^..HEAD >out && + grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_files && + test_line_count = 1 actual_diff_shortstat_dirstat_files +' + test_done |