diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-18 02:55:13 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-18 02:55:14 +0400 |
commit | be98d915bec9aadcf746192ce0c5ddc19926b8bb (patch) | |
tree | 43a1901eb05eb53e4f2105a3469e4529688cc66c /t | |
parent | f52752d36a98d0e5a70242d615d0f36f84936b45 (diff) | |
parent | 2c63d6eb46da4ef0abc9c040c927818e437d2fcc (diff) |
Merge branch 'jk/trailing-slash-in-pathspec'
Code refactoring.
* jk/trailing-slash-in-pathspec:
reset: handle submodule with trailing slash
rm: re-use parse_pathspec's trailing-slash removal
Diffstat (limited to 't')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 10f89bd0ce..c28e8d8ada 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -481,7 +481,7 @@ test_expect_success 'do not add files from a submodule' ' ' -test_expect_success 'gracefully add submodule with a trailing slash' ' +test_expect_success 'gracefully add/reset submodule with a trailing slash' ' git reset --hard && git commit -m "commit subproject" init && @@ -495,7 +495,9 @@ test_expect_success 'gracefully add submodule with a trailing slash' ' git add init/ && test_must_fail git diff --exit-code --cached init && test $commit = $(git ls-files --stage | - sed -n "s/^160000 \([^ ]*\).*/\1/p") + sed -n "s/^160000 \([^ ]*\).*/\1/p") && + git reset init/ && + git diff --exit-code --cached init ' |