From: Junio C Hamano Date: Thu, 5 May 2022 21:36:24 +0000 (-0700) Subject: Merge branch 'jc/show-pathspec-fix' into maint X-Git-Tag: v2.36.1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8da1481bdcd6c85a0e8839df61a16180b9434f10;p=thirdparty%2Fgit.git Merge branch 'jc/show-pathspec-fix' into maint "git show ... -- " lost the pathspec when showing the second and subsequent commits, which has been corrected. source: * jc/show-pathspec-fix: 2.36 show regression fix --- 8da1481bdcd6c85a0e8839df61a16180b9434f10 diff --cc t/t4013-diff-various.sh index 628b01f355,7a44d5d595..056e922164 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@@ -542,20 -542,25 +542,39 @@@ test_expect_success 'diff-tree --stdin 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 'show A B ... -- ' ' + # side touches dir/sub, file0, and file3 + # master^ touches dir/sub, and file1 + # master^^ touches dir/sub, file0, and file2 + git show --name-only --format="<%s>" side master^ master^^ -- dir >actual && + cat >expect <<-\EOF && + + + dir/sub + + + dir/sub + + + dir/sub + EOF + test_cmp expect actual + ' + test_expect_success 'diff -I: setup' ' git checkout master && test_seq 50 >file0 &&