t5000-t5999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Jul 1, 2018 at 20:24 UTC 51b85471af1d2df88749e8a7aa424a879e33a9d7
14 files changed +24 -24
t/t5300-pack-object.sh
+1 -1
@@ -191,7 +191,7 @@ test_expect_success 'survive missing objects/pack directory' '
191 mkdir missing-pack &&
192 cd missing-pack &&
193 git init &&
194 - GOP=.git/objects/pack
194 + GOP=.git/objects/pack &&
195 rm -fr $GOP &&
196 git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
197 test -f $GOP/pack-${packname_3}.pack &&
t/t5302-pack-index.sh
+1 -1
@@ -237,7 +237,7 @@ test_expect_success 'running index-pack in the object store' '
237 rm -f .git/objects/pack/* &&
238 cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&
239 (
240 - cd .git/objects/pack
240 + cd .git/objects/pack &&
241 git index-pack pack-${pack1}.pack
242 ) &&
243 test -f .git/objects/pack/pack-${pack1}.idx
t/t5401-update-hooks.sh
+2 -2
@@ -82,13 +82,13 @@ test_expect_success 'hooks ran' '
82 '
83
84 test_expect_success 'pre-receive hook input' '
85 - (echo $commit0 $commit1 refs/heads/master;
85 + (echo $commit0 $commit1 refs/heads/master &&
86 echo $commit1 $commit0 refs/heads/tofail
87 ) | test_cmp - victim.git/pre-receive.stdin
88 '
89
90 test_expect_success 'update hook arguments' '
91 - (echo refs/heads/master $commit0 $commit1;
91 + (echo refs/heads/master $commit0 $commit1 &&
92 echo refs/heads/tofail $commit1 $commit0
93 ) | test_cmp - victim.git/update.args
94 '
t/t5500-fetch-pack.sh
+1 -1
@@ -259,7 +259,7 @@ test_expect_success 'clone shallow object count' '
259 test_expect_success 'pull in shallow repo with missing merge base' '
260 (
261 cd shallow &&
262 - git fetch --depth 4 .. A
262 + git fetch --depth 4 .. A &&
263 test_must_fail git merge --allow-unrelated-histories FETCH_HEAD
264 )
265 '
t/t5505-remote.sh
+1 -1
@@ -844,7 +844,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
844 git remote rename origin origin &&
845 test_path_is_missing .git/branches/origin &&
846 test "$(git config remote.origin.url)" = "quux" &&
847 - test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin"
847 + test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin" &&
848 test "$(git config remote.origin.push)" = "HEAD:refs/heads/foom"
849 )
850 '
t/t5512-ls-remote.sh
+2 -2
@@ -15,7 +15,7 @@ test_expect_success setup '
15 git tag mark1.10 &&
16 git show-ref --tags -d | sed -e "s/ / /" >expected.tag &&
17 (
18 - echo "$(git rev-parse HEAD) HEAD"
18 + echo "$(git rev-parse HEAD) HEAD" &&
19 git show-ref -d | sed -e "s/ / /"
20 ) >expected.all &&
21
@@ -105,7 +105,7 @@ test_expect_success 'use branch.<name>.remote if possible' '
105 git clone . other.git &&
106 (
107 cd other.git &&
108 - echo "$(git rev-parse HEAD) HEAD"
108 + echo "$(git rev-parse HEAD) HEAD" &&
109 git show-ref | sed -e "s/ / /"
110 ) >exp &&
111
t/t5516-fetch-push.sh
+5 -5
@@ -923,7 +923,7 @@ test_expect_success 'push into aliased refs (consistent)' '
923 (
924 cd child1 &&
925 git branch foo &&
926 - git symbolic-ref refs/heads/bar refs/heads/foo
926 + git symbolic-ref refs/heads/bar refs/heads/foo &&
927 git config receive.denyCurrentBranch false
928 ) &&
929 (
@@ -945,7 +945,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '
945 (
946 cd child1 &&
947 git branch foo &&
948 - git symbolic-ref refs/heads/bar refs/heads/foo
948 + git symbolic-ref refs/heads/bar refs/heads/foo &&
949 git config receive.denyCurrentBranch false
950 ) &&
951 (
@@ -1011,7 +1011,7 @@ test_expect_success 'push --porcelain rejected' '
1011 mk_empty testrepo &&
1012 git push testrepo refs/heads/master:refs/remotes/origin/master &&
1013 (cd testrepo &&
1014 - git reset --hard origin/master^
1014 + git reset --hard origin/master^ &&
1015 git config receive.denyCurrentBranch true) &&
1016
1017 echo >.git/foo "To testrepo" &&
@@ -1025,7 +1025,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
1025 mk_empty testrepo &&
1026 git push testrepo refs/heads/master:refs/remotes/origin/master &&
1027 (cd testrepo &&
1028 - git reset --hard origin/master
1028 + git reset --hard origin/master &&
1029 git config receive.denyCurrentBranch true) &&
1030
1031 echo >.git/foo "To testrepo" &&
@@ -1333,7 +1333,7 @@ test_expect_success 'push --follow-tag only pushes relevant tags' '
1333 git commit --allow-empty -m "future commit" &&
1334 git tag -m "future" future &&
1335 git checkout master &&
1336 - git for-each-ref refs/heads/master refs/tags/tag >../expect
1336 + git for-each-ref refs/heads/master refs/tags/tag >../expect &&
1337 git push --follow-tag ../dst master
1338 ) &&
1339 (
t/t5517-push-mirror.sh
+5 -5
@@ -71,7 +71,7 @@ test_expect_success 'push mirror force updates existing branches' '
71 git push --mirror up &&
72 echo two >foo && git add foo && git commit -m two &&
73 git push --mirror up &&
74 - git reset --hard HEAD^
74 + git reset --hard HEAD^ &&
75 git push --mirror up
76 ) &&
77 master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
@@ -88,7 +88,7 @@ test_expect_success 'push mirror removes branches' '
88 echo one >foo && git add foo && git commit -m one &&
89 git branch remove master &&
90 git push --mirror up &&
91 - git branch -D remove
91 + git branch -D remove &&
92 git push --mirror up
93 ) &&
94 (
@@ -170,7 +170,7 @@ test_expect_success 'push mirror force updates existing tags' '
170 echo two >foo && git add foo && git commit -m two &&
171 git tag -f tmaster master &&
172 git push --mirror up &&
173 - git reset --hard HEAD^
173 + git reset --hard HEAD^ &&
174 git tag -f tmaster master &&
175 git push --mirror up
176 ) &&
@@ -188,7 +188,7 @@ test_expect_success 'push mirror removes tags' '
188 echo one >foo && git add foo && git commit -m one &&
189 git tag -f tremove master &&
190 git push --mirror up &&
191 - git tag -d tremove
191 + git tag -d tremove &&
192 git push --mirror up
193 ) &&
194 (
@@ -235,7 +235,7 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '
235 git branch keep master &&
236 git branch remove master &&
237 git push up &&
238 - git branch -D remove
238 + git branch -D remove &&
239 git push up
240 ) &&
241 (
t/t5526-fetch-submodules.sh
+1 -1
@@ -379,7 +379,7 @@ test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necess
379 git config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false
380 ) &&
381 git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&
382 - git config --unset fetch.recurseSubmodules
382 + git config --unset fetch.recurseSubmodules &&
383 (
384 cd submodule &&
385 git config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive
t/t5531-deep-submodule-push.sh
+1 -1
@@ -354,7 +354,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs
354 git clone a a1 &&
355 (
356 cd a1 &&
357 - git init b
357 + git init b &&
358 (
359 cd b &&
360 >junk &&
t/t5543-atomic-push.sh
+1 -1
@@ -178,7 +178,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus
178 test_expect_success 'atomic push is not advertised if configured' '
179 mk_repo_pair &&
180 (
181 - cd upstream
181 + cd upstream &&
182 git config receive.advertiseatomic 0
183 ) &&
184 (
t/t5601-clone.sh
+1 -1
@@ -618,7 +618,7 @@ hex2oct () {
618 test_expect_success 'clone on case-insensitive fs' '
619 git init icasefs &&
620 (
621 - cd icasefs
621 + cd icasefs &&
622 o=$(git hash-object -w --stdin </dev/null | hex2oct) &&
623 t=$(printf "100644 X\0${o}100644 x\0${o}" |
624 git hash-object -w -t tree --stdin) &&
t/t5605-clone-local.sh
+1 -1
@@ -94,7 +94,7 @@ test_expect_success 'clone empty repository' '
94 git config receive.denyCurrentBranch warn) &&
95 git clone empty empty-clone &&
96 test_tick &&
97 - (cd empty-clone
97 + (cd empty-clone &&
98 echo "content" >> foo &&
99 git add foo &&
100 git commit -m "Initial commit" &&
t/t5801-remote-helpers.sh
+1 -1
@@ -96,7 +96,7 @@ test_expect_success 'push new branch with old:new refspec' '
96
97 test_expect_success 'push new branch with HEAD:new refspec' '
98 (cd local &&
99 - git checkout new-name
99 + git checkout new-name &&
100 git push origin HEAD:new-refspec-2
101 ) &&
102 compare_refs local HEAD server refs/heads/new-refspec-2