diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-29 12:52:30 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-29 12:52:30 -0800 |
commit | 276d709305a8ac60e6165d1469122316e0bb1075 (patch) | |
tree | 16ae7cb26eac8b708418d7a5cbb91fbeb5d0fd95 /t | |
parent | Merge branch 'pp/gitweb-config-underscore' (diff) | |
parent | Teach rm to remove submodules when given with a trailing '/' (diff) | |
download | tgif-276d709305a8ac60e6165d1469122316e0bb1075.tar.xz |
Merge branch 'jl/submodule-rm'
Finishing touches to "git rm $submodule" that removes the working
tree of a submodule.
* jl/submodule-rm:
Teach rm to remove submodules when given with a trailing '/'
Diffstat (limited to 't')
-rwxr-xr-x | t/t3600-rm.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh index 97254e8d33..06f63848ea 100755 --- a/t/t3600-rm.sh +++ b/t/t3600-rm.sh @@ -302,6 +302,23 @@ test_expect_success 'rm removes work tree of unmodified submodules' ' test_cmp expect actual ' +test_expect_success 'rm removes a submodule with a trailing /' ' + git reset --hard && + git submodule update && + git rm submod/ && + test ! -d submod && + git status -s -uno --ignore-submodules=none > actual && + test_cmp expect actual +' + +test_expect_success 'rm fails when given a file with a trailing /' ' + test_must_fail git rm empty/ +' + +test_expect_success 'rm succeeds when given a directory with a trailing /' ' + git rm -r frotz/ +' + test_expect_success 'rm of a populated submodule with different HEAD fails unless forced' ' git reset --hard && git submodule update && |