aboutsummaryrefslogtreecommitdiff
path: root/t/t7400-submodule-basic.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-17 15:55:13 -0700
committerJunio C Hamano <gitster@pobox.com>2013-10-17 15:55:14 -0700
commitbe98d915bec9aadcf746192ce0c5ddc19926b8bb (patch)
tree43a1901eb05eb53e4f2105a3469e4529688cc66c /t/t7400-submodule-basic.sh
parentf52752d36a98d0e5a70242d615d0f36f84936b45 (diff)
parent2c63d6eb46da4ef0abc9c040c927818e437d2fcc (diff)
downloadgit-be98d915bec9aadcf746192ce0c5ddc19926b8bb.tar.gz
git-be98d915bec9aadcf746192ce0c5ddc19926b8bb.tar.xz
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/t7400-submodule-basic.sh')
-rwxr-xr-xt/t7400-submodule-basic.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 10f89bd0c..c28e8d8ad 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
'