]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7700: move keywords onto their own line
authorDenton Liu <liu.denton@gmail.com>
Wed, 27 Nov 2019 19:53:49 +0000 (11:53 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Nov 2019 21:20:15 +0000 (13:20 -0800)
The code style for tests is to have statements on their own line if
possible. Move keywords onto their own line so that they conform with
the test style.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7700-repack.sh

index 8936928387e022ad0b3dd33978d15edb08012793..a96e876c4e6d6d66586f3dfee1f77e15cefc46df 100755 (executable)
@@ -29,10 +29,12 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
        mv pack-* .git/objects/pack/ &&
        git repack -A -d -l &&
        git prune-packed &&
-       for p in .git/objects/pack/*.idx; do
+       for p in .git/objects/pack/*.idx
+       do
                idx=$(basename $p)
                test "pack-$packsha1.idx" = "$idx" && continue
-               if git verify-pack -v $p | egrep "^$objsha1"; then
+               if git verify-pack -v $p | egrep "^$objsha1"
+               then
                        found_duplicate_object=1
                        echo "DUPLICATE OBJECT FOUND"
                        break
@@ -45,10 +47,12 @@ test_expect_success 'writing bitmaps via command-line can duplicate .keep object
        # build on $objsha1, $packsha1, and .keep state from previous
        git repack -Adbl &&
        test_when_finished "found_duplicate_object=" &&
-       for p in .git/objects/pack/*.idx; do
+       for p in .git/objects/pack/*.idx
+       do
                idx=$(basename $p)
                test "pack-$packsha1.idx" = "$idx" && continue
-               if git verify-pack -v $p | egrep "^$objsha1"; then
+               if git verify-pack -v $p | egrep "^$objsha1"
+               then
                        found_duplicate_object=1
                        echo "DUPLICATE OBJECT FOUND"
                        break
@@ -61,10 +65,12 @@ test_expect_success 'writing bitmaps via config can duplicate .keep objects' '
        # build on $objsha1, $packsha1, and .keep state from previous
        git -c repack.writebitmaps=true repack -Adl &&
        test_when_finished "found_duplicate_object=" &&
-       for p in .git/objects/pack/*.idx; do
+       for p in .git/objects/pack/*.idx
+       do
                idx=$(basename $p)
                test "pack-$packsha1.idx" = "$idx" && continue
-               if git verify-pack -v $p | egrep "^$objsha1"; then
+               if git verify-pack -v $p | egrep "^$objsha1"
+               then
                        found_duplicate_object=1
                        echo "DUPLICATE OBJECT FOUND"
                        break
@@ -83,8 +89,10 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
        git commit -m commit_file3 &&
        git repack -a -d -l &&
        git prune-packed &&
-       for p in .git/objects/pack/*.idx; do
-               if git verify-pack -v $p | egrep "^$objsha1"; then
+       for p in .git/objects/pack/*.idx
+       do
+               if git verify-pack -v $p | egrep "^$objsha1"
+               then
                        found_duplicate_object=1
                        echo "DUPLICATE OBJECT FOUND"
                        break
@@ -99,10 +107,13 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is
        git repack -a &&
        myidx=$(ls -1 .git/objects/pack/*.idx) &&
        test -f "$myidx" &&
-       for p in alt_objects/pack/*.idx; do
+       for p in alt_objects/pack/*.idx
+       do
                git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
-       done | while read sha1 rest; do
-               if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+       done | while read sha1 rest
+       do
+               if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+               then
                        echo "Missing object in local pack: $sha1"
                        return 1
                fi
@@ -119,10 +130,13 @@ test_expect_success 'packed obs in alt ODB are repacked when local repo has pack
        git repack -a -d &&
        myidx=$(ls -1 .git/objects/pack/*.idx) &&
        test -f "$myidx" &&
-       for p in alt_objects/pack/*.idx; do
+       for p in alt_objects/pack/*.idx
+       do
                git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
-       done | while read sha1 rest; do
-               if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+       done | while read sha1 rest
+       do
+               if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+               then
                        echo "Missing object in local pack: $sha1"
                        return 1
                fi
@@ -144,10 +158,13 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
        git repack -a -d &&
        myidx=$(ls -1 .git/objects/pack/*.idx) &&
        test -f "$myidx" &&
-       for p in alt_objects/pack/*.idx; do
+       for p in alt_objects/pack/*.idx
+       do
                git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
-       done | while read sha1 rest; do
-               if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+       done | while read sha1 rest
+       do
+               if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+               then
                        echo "Missing object in local pack: $sha1"
                        return 1
                fi