diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-05-04 09:51:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-04 09:51:28 -0700 |
commit | d5a17b6665cd79a7bce54e8cde974503d0e8ddc6 (patch) | |
tree | 92320e5b298a734a7a57237aedea4265e2440daf /t/t4013-diff-various.sh | |
parent | 0f828332d5ac36fc63b7d8202652efa152809856 (diff) | |
parent | 5cdb38458ee5b53daada9cb767ae51a08650bd6a (diff) | |
download | git-d5a17b6665cd79a7bce54e8cde974503d0e8ddc6.tar.gz |
Merge branch 'jc/show-pathspec-fix'
"git show <commit1> <commit2>... -- <pathspec>" lost the pathspec
when showing the second and subsequent commits, which has been
corrected.
* jc/show-pathspec-fix:
2.36 show regression fix
Diffstat (limited to 't/t4013-diff-various.sh')
-rwxr-xr-x | t/t4013-diff-various.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 628b01f355..056e922164 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -556,6 +556,25 @@ test_expect_success 'diff-tree --stdin with pathspec' ' test_cmp expect actual ' +test_expect_success 'show A B ... -- <pathspec>' ' + # 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 && + <Side> + + dir/sub + <Third> + + dir/sub + <Second> + + dir/sub + EOF + test_cmp expect actual +' + test_expect_success 'diff -I<regex>: setup' ' git checkout master && test_seq 50 >file0 && |