diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:24 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-26 13:37:24 -0800 |
commit | 03f682bf740e6e617075e7e14e7f477190de8ab3 (patch) | |
tree | a493ce22dd767d6cd423f12c0adb013fc391ac29 /t | |
parent | Merge branch 'tb/conversion' (diff) | |
parent | submodule helper list: respect correct path prefix (diff) | |
download | tgif-03f682bf740e6e617075e7e14e7f477190de8ab3.tar.xz |
Merge branch 'sb/submodule-module-list-fix'
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')
-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 |