aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-04-28 10:46:04 -0700
committerJunio C Hamano <gitster@pobox.com>2022-04-28 10:46:04 -0700
commit3da993f2e63864668ca7ae1a91c351684aec319d (patch)
treec9fa6b5145e6f5918d79eb3e51f14bf344402164 /t
parentMerge branch 'gc/submodule-update-part2' (diff)
parent2.36 gitk/diff-tree --stdin regression fix (diff)
downloadgit-3da993f2e63864668ca7ae1a91c351684aec319d.tar.gz
git-3da993f2e63864668ca7ae1a91c351684aec319d.zip
Merge branch 'jc/diff-tree-stdin-fix'
"diff-tree --stdin" has been broken for about a year, but 2.36 release broke it even worse by breaking running the command with <pathspec>, which in turn broke "gitk" and got noticed. This has been corrected by aligning its behaviour to that of "log". * jc/diff-tree-stdin-fix: 2.36 gitk/diff-tree --stdin regression fix
Diffstat (limited to 't')
-rwxr-xr-xt/t4013-diff-various.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 750aee17ea..628b01f355 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -542,6 +542,20 @@ test_expect_success 'diff-tree --stdin with log formatting' '
test_cmp expect actual
'
+test_expect_success 'diff-tree --stdin with pathspec' '
+ cat >expect <<-EOF &&
+ Third
+
+ dir/sub
+ Second
+
+ dir/sub
+ EOF
+ git rev-list master^ |
+ git diff-tree -r --stdin --name-only --format=%s dir >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'diff -I<regex>: setup' '
git checkout master &&
test_seq 50 >file0 &&