summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-03-13 22:56:04 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-13 22:56:04 -0700
commita4b4f9b8e317844ef64ec073241d38c9a656b2c8 (patch)
tree57cc5feab6b76b64687035c8b075527023a19e49 /t
parentMerge branch 'ms/submodule-update-config-doc' into maint (diff)
parentdiff --shortstat --dirstat: remove duplicate output (diff)
downloadtgif-a4b4f9b8e317844ef64ec073241d38c9a656b2c8.tar.xz
Merge branch 'mk/diff-shortstat-dirstat-fix' into maint
"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-xt/t4047-diff-dirstat.sh14
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