Merge branch 'sb/t3600-cleanup'

Code cleanup.

* sb/t3600-cleanup:
  t3600: slightly modernize style
  t3600: remove useless redirect
This commit is contained in:
Junio C Hamano 2016-12-19 14:45:39 -08:00
commit 2d91cb7935

View file

@ -125,7 +125,7 @@ test_expect_success '"rm" command suppressed with --quiet' '
git add test-file &&
git commit -m "add file for rm --quiet test" &&
git rm --quiet test-file >rm-output &&
test $(wc -l < rm-output) = 0 &&
test_must_be_empty rm-output &&
rm -f test-file rm-output &&
git commit -m "remove file from rm --quiet test"
'
@ -335,9 +335,7 @@ test_expect_success 'rm succeeds when given a directory with a trailing /' '
test_expect_success 'rm of a populated submodule with different HEAD fails unless forced' '
git reset --hard &&
git submodule update &&
(cd submod &&
git checkout HEAD^
) &&
git -C submod checkout HEAD^ &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -418,9 +416,7 @@ test_expect_success 'rm issues a warning when section is not found in .gitmodule
test_expect_success 'rm of a populated submodule with modifications fails unless forced' '
git reset --hard &&
git submodule update &&
(cd submod &&
echo X >empty
) &&
echo X >submod/empty &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -435,9 +431,7 @@ test_expect_success 'rm of a populated submodule with modifications fails unless
test_expect_success 'rm of a populated submodule with untracked files fails unless forced' '
git reset --hard &&
git submodule update &&
(cd submod &&
echo X >untracked
) &&
echo X >submod/untracked &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -461,16 +455,12 @@ test_expect_success 'setup submodule conflict' '
git add nitfol &&
git commit -m "added nitfol 2" &&
git checkout -b conflict1 master &&
(cd submod &&
git fetch &&
git checkout branch1
) &&
git -C submod fetch &&
git -C submod checkout branch1 &&
git add submod &&
git commit -m "submod 1" &&
git checkout -b conflict2 master &&
(cd submod &&
git checkout branch2
) &&
git -C submod checkout branch2 &&
git add submod &&
git commit -m "submod 2"
'
@ -494,9 +484,7 @@ test_expect_success 'rm of a conflicted populated submodule with different HEAD
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
(cd submod &&
git checkout HEAD^
) &&
git -C submod checkout HEAD^ &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test -d submod &&
@ -515,9 +503,7 @@ test_expect_success 'rm of a conflicted populated submodule with modifications f
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
(cd submod &&
echo X >empty
) &&
echo X >submod/empty &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test -d submod &&
@ -536,9 +522,7 @@ test_expect_success 'rm of a conflicted populated submodule with untracked files
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
(cd submod &&
echo X >untracked
) &&
echo X >submod/untracked &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test -d submod &&
@ -636,9 +620,7 @@ test_expect_success 'rm recursively removes work tree of unmodified submodules'
test_expect_success 'rm of a populated nested submodule with different nested HEAD fails unless forced' '
git reset --hard &&
git submodule update --recursive &&
(cd submod/subsubmod &&
git checkout HEAD^
) &&
git -C submod/subsubmod checkout HEAD^ &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -653,9 +635,7 @@ test_expect_success 'rm of a populated nested submodule with different nested HE
test_expect_success 'rm of a populated nested submodule with nested modifications fails unless forced' '
git reset --hard &&
git submodule update --recursive &&
(cd submod/subsubmod &&
echo X >empty
) &&
echo X >submod/subsubmod/empty &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -670,9 +650,7 @@ test_expect_success 'rm of a populated nested submodule with nested modification
test_expect_success 'rm of a populated nested submodule with nested untracked files fails unless forced' '
git reset --hard &&
git submodule update --recursive &&
(cd submod/subsubmod &&
echo X >untracked
) &&
echo X >submod/subsubmod/untracked &&
test_must_fail git rm submod &&
test -d submod &&
test -f submod/.git &&
@ -709,7 +687,7 @@ test_expect_success 'checking out a commit after submodule removal needs manual
git commit -m "submodule removal" submod &&
git checkout HEAD^ &&
git submodule update &&
git checkout -q HEAD^ 2>actual &&
git checkout -q HEAD^ &&
git checkout -q master 2>actual &&
test_i18ngrep "^warning: unable to rmdir submod:" actual &&
git status -s submod >actual &&