diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:45 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:45 -0800 |
| commit | 1191d606bb2b544e3d8429d07f8ff43aae7d8145 (patch) | |
| tree | 40514c12554e99ac408b064627027f70bbf92ebf /t/t7400-submodule-basic.sh | |
| parent | 7f18fadcbc409c24d9d76a913eb280db74b8a89a (diff) | |
| parent | 2b56bb7a87ab429c225f6325f2870cbeac0d19f9 (diff) | |
| download | git-1191d606bb2b544e3d8429d07f8ff43aae7d8145.tar.xz | |
Merge branch 'sb/submodule-module-list-fix' into maint
A helper function "git submodule" uses since v2.7.0 to list the
modules that match the pathspec argument given to its subcommands
(e.g. "submodule add <repo> <path>") has been fixed.
* sb/submodule-module-list-fix:
submodule helper list: respect correct path prefix
Diffstat (limited to 't/t7400-submodule-basic.sh')
| -rwxr-xr-x | t/t7400-submodule-basic.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 540771ca41..be82a75e54 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -999,5 +999,30 @@ test_expect_success 'submodule add clone shallow submodule' ' ) ' +test_expect_success 'submodule helper list is not confused by common prefixes' ' + mkdir -p dir1/b && + ( + cd dir1/b && + git init && + echo hi >testfile2 && + git add . && + git commit -m "test1" + ) && + mkdir -p dir2/b && + ( + cd dir2/b && + git init && + echo hello >testfile1 && + git add . && + git commit -m "test2" + ) && + git submodule add /dir1/b dir1/b && + git submodule add /dir2/b dir2/b && + git commit -m "first submodule commit" && + git submodule--helper list dir1/b |cut -c51- >actual && + echo "dir1/b" >expect && + test_cmp expect actual +' + test_done |
