t7102,t7201: remove unnecessary blank spaces in test body

t7102 and t7201 still follow the old style of having blank
lines around test body, which is not consistence with our
current practice.

Let's remove those unnecessary blank lines.

Signed-off-by: Charvi Mendiratta <charvi077@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Charvi Mendiratta 2020-10-20 17:13:16 +05:30 committed by Junio C Hamano
parent e166fe363d
commit 78b8d9340d
2 changed files with 0 additions and 34 deletions

View File

@ -439,7 +439,6 @@ test_expect_success 'test --mixed <paths>' '
' '
test_expect_success 'test resetting the index at give paths' ' test_expect_success 'test resetting the index at give paths' '
mkdir sub && mkdir sub &&
>sub/file1 && >sub/file1 &&
>sub/file2 && >sub/file2 &&
@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' '
echo "$U" && echo "$U" &&
test_must_fail git diff-index --cached --exit-code "$T" && test_must_fail git diff-index --cached --exit-code "$T" &&
test "$T" != "$U" test "$T" != "$U"
' '
test_expect_success 'resetting an unmodified path is a no-op' ' test_expect_success 'resetting an unmodified path is a no-op' '
@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' '
' '
test_expect_success 'disambiguation (1)' ' test_expect_success 'disambiguation (1)' '
git reset --hard && git reset --hard &&
>secondfile && >secondfile &&
git add secondfile && git add secondfile &&
@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' '
test -z "$(git diff --cached --name-only)" && test -z "$(git diff --cached --name-only)" &&
test -f secondfile && test -f secondfile &&
test_must_be_empty secondfile test_must_be_empty secondfile
' '
test_expect_success 'disambiguation (2)' ' test_expect_success 'disambiguation (2)' '
git reset --hard && git reset --hard &&
>secondfile && >secondfile &&
git add secondfile && git add secondfile &&
@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' '
test_must_fail git reset secondfile && test_must_fail git reset secondfile &&
test -n "$(git diff --cached --name-only -- secondfile)" && test -n "$(git diff --cached --name-only -- secondfile)" &&
test ! -f secondfile test ! -f secondfile
' '
test_expect_success 'disambiguation (3)' ' test_expect_success 'disambiguation (3)' '
git reset --hard && git reset --hard &&
>secondfile && >secondfile &&
git add secondfile && git add secondfile &&
@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' '
test_must_fail git diff --quiet && test_must_fail git diff --quiet &&
test -z "$(git diff --cached --name-only)" && test -z "$(git diff --cached --name-only)" &&
test ! -f secondfile test ! -f secondfile
' '
test_expect_success 'disambiguation (4)' ' test_expect_success 'disambiguation (4)' '
git reset --hard && git reset --hard &&
>secondfile && >secondfile &&
git add secondfile && git add secondfile &&

View File

@ -33,7 +33,6 @@ fill () {
test_expect_success setup ' test_expect_success setup '
fill x y z > same && fill x y z > same &&
fill 1 2 3 4 5 6 7 8 >one && fill 1 2 3 4 5 6 7 8 >one &&
fill a b c d e >two && fill a b c d e >two &&
@ -63,7 +62,6 @@ test_expect_success setup '
' '
test_expect_success 'checkout from non-existing branch' ' test_expect_success 'checkout from non-existing branch' '
git checkout -b delete-me master && git checkout -b delete-me master &&
git update-ref -d --no-deref refs/heads/delete-me && git update-ref -d --no-deref refs/heads/delete-me &&
test refs/heads/delete-me = "$(git symbolic-ref HEAD)" && test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' '
' '
test_expect_success 'checkout with dirty tree without -m' ' test_expect_success 'checkout with dirty tree without -m' '
fill 0 1 2 3 4 5 6 7 8 >one && fill 0 1 2 3 4 5 6 7 8 >one &&
if git checkout side if git checkout side
then then
@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' '
else else
echo "happy - failed correctly" echo "happy - failed correctly"
fi fi
' '
test_expect_success 'checkout with unrelated dirty tree without -m' ' test_expect_success 'checkout with unrelated dirty tree without -m' '
git checkout -f master && git checkout -f master &&
fill 0 1 2 3 4 5 6 7 8 >same && fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept && cp same kept &&
@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' '
' '
test_expect_success 'checkout -m with dirty tree' ' test_expect_success 'checkout -m with dirty tree' '
git checkout -f master && git checkout -f master &&
git clean -f && git clean -f &&
@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' '
' '
test_expect_success 'checkout -m with dirty tree, renamed' ' test_expect_success 'checkout -m with dirty tree, renamed' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
fill 1 2 3 4 5 7 8 >one && fill 1 2 3 4 5 7 8 >one &&
@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' '
! test -f one && ! test -f one &&
git diff --cached >current && git diff --cached >current &&
test_must_be_empty current test_must_be_empty current
' '
test_expect_success 'checkout -m with merge conflict' ' test_expect_success 'checkout -m with merge conflict' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
fill 1 T 3 4 5 6 S 8 >one && fill 1 T 3 4 5 6 S 8 >one &&
@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' '
' '
test_expect_success 'format of merge conflict from checkout -m' ' test_expect_success 'format of merge conflict from checkout -m' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
fill b d > two && fill b d > two &&
@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' '
' '
test_expect_success 'checkout --merge --conflict=diff3 <branch>' ' test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
git checkout -f master && git reset --hard && git clean -f && git checkout -f master && git reset --hard && git clean -f &&
fill b d > two && fill b d > two &&
@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 <branch>' '
' '
test_expect_success 'switch to another branch while carrying a deletion' ' test_expect_success 'switch to another branch while carrying a deletion' '
git checkout -f master && git reset --hard && git clean -f && git checkout -f master && git reset --hard && git clean -f &&
git rm two && git rm two &&
@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' '
' '
test_expect_success 'checkout to detach HEAD (with advice declined)' ' test_expect_success 'checkout to detach HEAD (with advice declined)' '
git config advice.detachedHead false && git config advice.detachedHead false &&
rev=$(git rev-parse --short renamer^) && rev=$(git rev-parse --short renamer^) &&
git checkout -f renamer && git clean -f && git checkout -f renamer && git clean -f &&
@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' '
' '
test_expect_success 'checkout to detach HEAD with branchname^' ' test_expect_success 'checkout to detach HEAD with branchname^' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
git checkout renamer^ && git checkout renamer^ &&
H=$(git rev-parse --verify HEAD) && H=$(git rev-parse --verify HEAD) &&
@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
' '
test_expect_success 'checkout to detach HEAD with :/message' ' test_expect_success 'checkout to detach HEAD with :/message' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
git checkout ":/Initial" && git checkout ":/Initial" &&
H=$(git rev-parse --verify HEAD) && H=$(git rev-parse --verify HEAD) &&
@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' '
' '
test_expect_success 'checkout to detach HEAD with HEAD^0' ' test_expect_success 'checkout to detach HEAD with HEAD^0' '
git checkout -f master && git clean -f && git checkout -f master && git clean -f &&
git checkout HEAD^0 && git checkout HEAD^0 &&
H=$(git rev-parse --verify HEAD) && H=$(git rev-parse --verify HEAD) &&
@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' '
' '
test_expect_success 'checkout with ambiguous tag/branch names' ' test_expect_success 'checkout with ambiguous tag/branch names' '
git tag both side && git tag both side &&
git branch both master && git branch both master &&
git reset --hard && git reset --hard &&
@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '
test "z$H" = "z$M" && test "z$H" = "z$M" &&
name=$(git symbolic-ref HEAD 2>/dev/null) && name=$(git symbolic-ref HEAD 2>/dev/null) &&
test "z$name" = zrefs/heads/both test "z$name" = zrefs/heads/both
' '
test_expect_success 'checkout with ambiguous tag/branch names' ' test_expect_success 'checkout with ambiguous tag/branch names' '
git reset --hard && git reset --hard &&
git checkout master && git checkout master &&
@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' '
else else
: happy : happy
fi fi
' '
test_expect_success 'switch branches while in subdirectory' ' test_expect_success 'switch branches while in subdirectory' '
git reset --hard && git reset --hard &&
git checkout master && git checkout master &&
@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' '
) && ) &&
! test -f subs/one && ! test -f subs/one &&
rm -fr subs rm -fr subs
' '
test_expect_success 'checkout specific path while in subdirectory' ' test_expect_success 'checkout specific path while in subdirectory' '
git reset --hard && git reset --hard &&
git checkout side && git checkout side &&
mkdir subs && mkdir subs &&
@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' '
git checkout side -- bero git checkout side -- bero
) && ) &&
test -f subs/bero test -f subs/bero
' '
test_expect_success 'checkout w/--track sets up tracking' ' test_expect_success 'checkout w/--track sets up tracking' '
@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' '
test $(git symbolic-ref HEAD) = refs/heads/master && test $(git symbolic-ref HEAD) = refs/heads/master &&
git diff --exit-code && git diff --exit-code &&
git diff --cached --exit-code git diff --cached --exit-code
' '
test_expect_success 'switch out of non-branch' ' test_expect_success 'switch out of non-branch' '