Skip to content

Commit

Permalink
tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"
Browse files Browse the repository at this point in the history
Change occurrences "cd" followed by "fetch" on a single line to be on
two lines.

This is purely a stylistic change pointed out in code review for an
unrelated patch. Change the these tests use so new tests added later
using the more common style don't look out of place.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
avar authored and gitster committed May 1, 2017
1 parent 584f897 commit 28d67d9
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions t/t5612-clone-refspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ test_expect_success 'setup' '

test_expect_success 'by default all branches will be kept updated' '
(
cd dir_all && git fetch &&
cd dir_all &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
Expand All @@ -71,7 +72,8 @@ test_expect_success 'by default all branches will be kept updated' '

test_expect_success 'by default no tags will be kept updated' '
(
cd dir_all && git fetch &&
cd dir_all &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
Expand All @@ -80,7 +82,8 @@ test_expect_success 'by default no tags will be kept updated' '

test_expect_success '--single-branch while HEAD pointing at master' '
(
cd dir_master && git fetch &&
cd dir_master &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
Expand All @@ -92,7 +95,8 @@ test_expect_success '--single-branch while HEAD pointing at master' '

test_expect_success '--single-branch while HEAD pointing at side' '
(
cd dir_side && git fetch &&
cd dir_side &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
Expand All @@ -104,7 +108,8 @@ test_expect_success '--single-branch while HEAD pointing at side' '

test_expect_success '--single-branch with explicit --branch side' '
(
cd dir_side2 && git fetch &&
cd dir_side2 &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
Expand All @@ -116,7 +121,8 @@ test_expect_success '--single-branch with explicit --branch side' '

test_expect_success '--single-branch with explicit --branch with tag fetches updated tag' '
(
cd dir_tag && git fetch &&
cd dir_tag &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
Expand All @@ -125,7 +131,8 @@ test_expect_success '--single-branch with explicit --branch with tag fetches upd

test_expect_success '--single-branch with --mirror' '
(
cd dir_mirror && git fetch &&
cd dir_mirror &&
git fetch &&
git for-each-ref refs > ../actual
) &&
git for-each-ref refs >expect &&
Expand All @@ -134,7 +141,8 @@ test_expect_success '--single-branch with --mirror' '

test_expect_success '--single-branch with explicit --branch and --mirror' '
(
cd dir_mirror_side && git fetch &&
cd dir_mirror_side &&
git fetch &&
git for-each-ref refs > ../actual
) &&
git for-each-ref refs >expect &&
Expand All @@ -143,7 +151,8 @@ test_expect_success '--single-branch with explicit --branch and --mirror' '

test_expect_success '--single-branch with detached' '
(
cd dir_detached && git fetch &&
cd dir_detached &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
Expand Down

0 comments on commit 28d67d9

Please sign in to comment.