diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:56 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-19 11:33:56 -0800 |
commit | f4f233e13daa584e5178141eb10e6e9527a3454c (patch) | |
tree | 2705e845567749c51ba409d303502f5d4e576188 /t | |
parent | Merge branch 'jt/diff-anchored-patience' (diff) | |
parent | pathspec: only match across submodule boundaries when requested (diff) | |
download | tgif-f4f233e13daa584e5178141eb10e6e9527a3454c.tar.xz |
Merge branch 'bw/pathspec-match-submodule-boundary'
An v2.12-era regression in pathspec match logic, which made it look
into submodule tree even when it is not desired, has been fixed.
* bw/pathspec-match-submodule-boundary:
pathspec: only match across submodule boundaries when requested
Diffstat (limited to 't')
-rwxr-xr-x | t/t4208-log-magic-pathspec.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh index 935df6a65c..a1705f70cf 100755 --- a/t/t4208-log-magic-pathspec.sh +++ b/t/t4208-log-magic-pathspec.sh @@ -93,4 +93,23 @@ test_expect_success 'command line pathspec parsing for "git log"' ' git log --merge -- a ' +test_expect_success 'tree_entry_interesting does not match past submodule boundaries' ' + test_when_finished "rm -rf repo submodule" && + git init submodule && + test_commit -C submodule initial && + git init repo && + >"repo/[bracket]" && + git -C repo add "[bracket]" && + test_tick && + git -C repo commit -m bracket && + git -C repo rev-list HEAD -- "[bracket]" >expect && + + git -C repo submodule add ../submodule && + test_tick && + git -C repo commit -m submodule && + + git -C repo rev-list HEAD -- "[bracket]" >actual && + test_cmp expect actual +' + test_done |