summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-12-26 11:42:07 +0900
committerJunio C Hamano <gitster@pobox.com>2022-12-26 11:42:07 +0900
commite57caee004362ee855a3bc8fc826abe251eb64f8 (patch)
treed6b8c29059cff7a5225e830729e70ab7afa018d7 /t
parent78d15022e741b8f237b83d3f4bb8543674d9693d (diff)
parent209d9cb0114dff72e96d58bb3c27409660f1b45c (diff)
Merge branch 'pg/diff-stat-unmerged-regression-fix'
The output from "git diff --stat" on an unmerged path lost the terminating LF in Git 2.39, which has been corrected. * pg/diff-stat-unmerged-regression-fix: diff: fix regression with --stat and unmerged file
Diffstat (limited to 't')
-rwxr-xr-xt/t4046-diff-unmerged.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t4046-diff-unmerged.sh b/t/t4046-diff-unmerged.sh
index 0ae0cd3a52..ffaf69335f 100755
--- a/t/t4046-diff-unmerged.sh
+++ b/t/t4046-diff-unmerged.sh
@@ -86,4 +86,14 @@ test_expect_success 'diff-files -3' '
test_cmp diff-files-3.expect diff-files-3.actual
'
+test_expect_success 'diff --stat' '
+ for path in $paths
+ do
+ echo " $path | Unmerged" || return 1
+ done >diff-stat.expect &&
+ echo " 0 files changed" >>diff-stat.expect &&
+ git diff --cached --stat >diff-stat.actual &&
+ test_cmp diff-stat.expect diff-stat.actual
+'
+
test_done