t5000-t5999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Eric Sunshine 2018-07-01 20:24:01 -04:00 committed by Junio C Hamano
parent f957f03b60
commit 51b85471af
14 changed files with 24 additions and 24 deletions

View File

@ -191,7 +191,7 @@ test_expect_success 'survive missing objects/pack directory' '
mkdir missing-pack && mkdir missing-pack &&
cd missing-pack && cd missing-pack &&
git init && git init &&
GOP=.git/objects/pack GOP=.git/objects/pack &&
rm -fr $GOP && rm -fr $GOP &&
git index-pack --stdin --keep=test <../test-3-${packname_3}.pack && git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
test -f $GOP/pack-${packname_3}.pack && test -f $GOP/pack-${packname_3}.pack &&

View File

@ -237,7 +237,7 @@ test_expect_success 'running index-pack in the object store' '
rm -f .git/objects/pack/* && rm -f .git/objects/pack/* &&
cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack && cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&
( (
cd .git/objects/pack cd .git/objects/pack &&
git index-pack pack-${pack1}.pack git index-pack pack-${pack1}.pack
) && ) &&
test -f .git/objects/pack/pack-${pack1}.idx test -f .git/objects/pack/pack-${pack1}.idx

View File

@ -82,13 +82,13 @@ test_expect_success 'hooks ran' '
' '


test_expect_success 'pre-receive hook input' ' test_expect_success 'pre-receive hook input' '
(echo $commit0 $commit1 refs/heads/master; (echo $commit0 $commit1 refs/heads/master &&
echo $commit1 $commit0 refs/heads/tofail echo $commit1 $commit0 refs/heads/tofail
) | test_cmp - victim.git/pre-receive.stdin ) | test_cmp - victim.git/pre-receive.stdin
' '


test_expect_success 'update hook arguments' ' test_expect_success 'update hook arguments' '
(echo refs/heads/master $commit0 $commit1; (echo refs/heads/master $commit0 $commit1 &&
echo refs/heads/tofail $commit1 $commit0 echo refs/heads/tofail $commit1 $commit0
) | test_cmp - victim.git/update.args ) | test_cmp - victim.git/update.args
' '

View File

@ -259,7 +259,7 @@ test_expect_success 'clone shallow object count' '
test_expect_success 'pull in shallow repo with missing merge base' ' test_expect_success 'pull in shallow repo with missing merge base' '
( (
cd shallow && cd shallow &&
git fetch --depth 4 .. A git fetch --depth 4 .. A &&
test_must_fail git merge --allow-unrelated-histories FETCH_HEAD test_must_fail git merge --allow-unrelated-histories FETCH_HEAD
) )
' '

View File

@ -844,7 +844,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
git remote rename origin origin && git remote rename origin origin &&
test_path_is_missing .git/branches/origin && test_path_is_missing .git/branches/origin &&
test "$(git config remote.origin.url)" = "quux" && test "$(git config remote.origin.url)" = "quux" &&
test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin" test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin" &&
test "$(git config remote.origin.push)" = "HEAD:refs/heads/foom" test "$(git config remote.origin.push)" = "HEAD:refs/heads/foom"
) )
' '

View File

@ -15,7 +15,7 @@ test_expect_success setup '
git tag mark1.10 && git tag mark1.10 &&
git show-ref --tags -d | sed -e "s/ / /" >expected.tag && git show-ref --tags -d | sed -e "s/ / /" >expected.tag &&
( (
echo "$(git rev-parse HEAD) HEAD" echo "$(git rev-parse HEAD) HEAD" &&
git show-ref -d | sed -e "s/ / /" git show-ref -d | sed -e "s/ / /"
) >expected.all && ) >expected.all &&


@ -105,7 +105,7 @@ test_expect_success 'use branch.<name>.remote if possible' '
git clone . other.git && git clone . other.git &&
( (
cd other.git && cd other.git &&
echo "$(git rev-parse HEAD) HEAD" echo "$(git rev-parse HEAD) HEAD" &&
git show-ref | sed -e "s/ / /" git show-ref | sed -e "s/ / /"
) >exp && ) >exp &&



View File

@ -923,7 +923,7 @@ test_expect_success 'push into aliased refs (consistent)' '
( (
cd child1 && cd child1 &&
git branch foo && git branch foo &&
git symbolic-ref refs/heads/bar refs/heads/foo git symbolic-ref refs/heads/bar refs/heads/foo &&
git config receive.denyCurrentBranch false git config receive.denyCurrentBranch false
) && ) &&
( (
@ -945,7 +945,7 @@ test_expect_success 'push into aliased refs (inconsistent)' '
( (
cd child1 && cd child1 &&
git branch foo && git branch foo &&
git symbolic-ref refs/heads/bar refs/heads/foo git symbolic-ref refs/heads/bar refs/heads/foo &&
git config receive.denyCurrentBranch false git config receive.denyCurrentBranch false
) && ) &&
( (
@ -1011,7 +1011,7 @@ test_expect_success 'push --porcelain rejected' '
mk_empty testrepo && mk_empty testrepo &&
git push testrepo refs/heads/master:refs/remotes/origin/master && git push testrepo refs/heads/master:refs/remotes/origin/master &&
(cd testrepo && (cd testrepo &&
git reset --hard origin/master^ git reset --hard origin/master^ &&
git config receive.denyCurrentBranch true) && git config receive.denyCurrentBranch true) &&


echo >.git/foo "To testrepo" && echo >.git/foo "To testrepo" &&
@ -1025,7 +1025,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '
mk_empty testrepo && mk_empty testrepo &&
git push testrepo refs/heads/master:refs/remotes/origin/master && git push testrepo refs/heads/master:refs/remotes/origin/master &&
(cd testrepo && (cd testrepo &&
git reset --hard origin/master git reset --hard origin/master &&
git config receive.denyCurrentBranch true) && git config receive.denyCurrentBranch true) &&


echo >.git/foo "To testrepo" && echo >.git/foo "To testrepo" &&
@ -1333,7 +1333,7 @@ test_expect_success 'push --follow-tag only pushes relevant tags' '
git commit --allow-empty -m "future commit" && git commit --allow-empty -m "future commit" &&
git tag -m "future" future && git tag -m "future" future &&
git checkout master && git checkout master &&
git for-each-ref refs/heads/master refs/tags/tag >../expect git for-each-ref refs/heads/master refs/tags/tag >../expect &&
git push --follow-tag ../dst master git push --follow-tag ../dst master
) && ) &&
( (

View File

@ -71,7 +71,7 @@ test_expect_success 'push mirror force updates existing branches' '
git push --mirror up && git push --mirror up &&
echo two >foo && git add foo && git commit -m two && echo two >foo && git add foo && git commit -m two &&
git push --mirror up && git push --mirror up &&
git reset --hard HEAD^ git reset --hard HEAD^ &&
git push --mirror up git push --mirror up
) && ) &&
master_master=$(cd master && git show-ref -s --verify refs/heads/master) && master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
@ -88,7 +88,7 @@ test_expect_success 'push mirror removes branches' '
echo one >foo && git add foo && git commit -m one && echo one >foo && git add foo && git commit -m one &&
git branch remove master && git branch remove master &&
git push --mirror up && git push --mirror up &&
git branch -D remove git branch -D remove &&
git push --mirror up git push --mirror up
) && ) &&
( (
@ -170,7 +170,7 @@ test_expect_success 'push mirror force updates existing tags' '
echo two >foo && git add foo && git commit -m two && echo two >foo && git add foo && git commit -m two &&
git tag -f tmaster master && git tag -f tmaster master &&
git push --mirror up && git push --mirror up &&
git reset --hard HEAD^ git reset --hard HEAD^ &&
git tag -f tmaster master && git tag -f tmaster master &&
git push --mirror up git push --mirror up
) && ) &&
@ -188,7 +188,7 @@ test_expect_success 'push mirror removes tags' '
echo one >foo && git add foo && git commit -m one && echo one >foo && git add foo && git commit -m one &&
git tag -f tremove master && git tag -f tremove master &&
git push --mirror up && git push --mirror up &&
git tag -d tremove git tag -d tremove &&
git push --mirror up git push --mirror up
) && ) &&
( (
@ -235,7 +235,7 @@ test_expect_success 'remote.foo.mirror adds and removes branches' '
git branch keep master && git branch keep master &&
git branch remove master && git branch remove master &&
git push up && git push up &&
git branch -D remove git branch -D remove &&
git push up git push up
) && ) &&
( (

View File

@ -379,7 +379,7 @@ test_expect_success "'--recurse-submodules=on-demand' recurses as deep as necess
git config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false git config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false
) && ) &&
git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err && git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&
git config --unset fetch.recurseSubmodules git config --unset fetch.recurseSubmodules &&
( (
cd submodule && cd submodule &&
git config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive git config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive

View File

@ -354,7 +354,7 @@ test_expect_success 'push succeeds if submodule has no remote and is on the firs
git clone a a1 && git clone a a1 &&
( (
cd a1 && cd a1 &&
git init b git init b &&
( (
cd b && cd b &&
>junk && >junk &&

View File

@ -178,7 +178,7 @@ test_expect_success 'atomic push obeys update hook preventing a branch to be pus
test_expect_success 'atomic push is not advertised if configured' ' test_expect_success 'atomic push is not advertised if configured' '
mk_repo_pair && mk_repo_pair &&
( (
cd upstream cd upstream &&
git config receive.advertiseatomic 0 git config receive.advertiseatomic 0
) && ) &&
( (

View File

@ -618,7 +618,7 @@ hex2oct () {
test_expect_success 'clone on case-insensitive fs' ' test_expect_success 'clone on case-insensitive fs' '
git init icasefs && git init icasefs &&
( (
cd icasefs cd icasefs &&
o=$(git hash-object -w --stdin </dev/null | hex2oct) && o=$(git hash-object -w --stdin </dev/null | hex2oct) &&
t=$(printf "100644 X\0${o}100644 x\0${o}" | t=$(printf "100644 X\0${o}100644 x\0${o}" |
git hash-object -w -t tree --stdin) && git hash-object -w -t tree --stdin) &&

View File

@ -94,7 +94,7 @@ test_expect_success 'clone empty repository' '
git config receive.denyCurrentBranch warn) && git config receive.denyCurrentBranch warn) &&
git clone empty empty-clone && git clone empty empty-clone &&
test_tick && test_tick &&
(cd empty-clone (cd empty-clone &&
echo "content" >> foo && echo "content" >> foo &&
git add foo && git add foo &&
git commit -m "Initial commit" && git commit -m "Initial commit" &&

View File

@ -96,7 +96,7 @@ test_expect_success 'push new branch with old:new refspec' '


test_expect_success 'push new branch with HEAD:new refspec' ' test_expect_success 'push new branch with HEAD:new refspec' '
(cd local && (cd local &&
git checkout new-name git checkout new-name &&
git push origin HEAD:new-refspec-2 git push origin HEAD:new-refspec-2
) && ) &&
compare_refs local HEAD server refs/heads/new-refspec-2 compare_refs local HEAD server refs/heads/new-refspec-2