Browse Source

Merge branch 'jc/push-2.0-default-to-simple' (early part)

Adjust our tests for upcoming migration of the default value for the
"push.default" configuration variable to "simple" from "mixed".

* 'jc/push-2.0-default-to-simple' (early part):
  t5570: do not assume the "matching" push is the default
  t5551: do not assume the "matching" push is the default
  t5550: do not assume the "matching" push is the default
  t9401: do not assume the "matching" push is the default
  t9400: do not assume the "matching" push is the default
  t7406: do not assume the "matching" push is the default
  t5531: do not assume the "matching" push is the default
  t5519: do not assume the "matching" push is the default
  t5517: do not assume the "matching" push is the default
  t5516: do not assume the "matching" push is the default
  t5505: do not assume the "matching" push is the default
  t5404: do not assume the "matching" push is the default
maint
Junio C Hamano 12 years ago
parent
commit
54a3c67375
  1. 2
      t/t5404-tracking-branches.sh
  2. 2
      t/t5505-remote.sh
  3. 12
      t/t5516-fetch-push.sh
  4. 2
      t/t5517-push-mirror.sh
  5. 12
      t/t5519-push-alternates.sh
  6. 1
      t/t5531-deep-submodule-push.sh
  7. 1
      t/t5550-http-fetch.sh
  8. 1
      t/t5551-http-fetch.sh
  9. 1
      t/t5570-git-daemon.sh
  10. 4
      t/t7406-submodule-update.sh
  11. 1
      t/t9400-git-cvsserver-server.sh
  12. 1
      t/t9401-git-cvsserver-crlf.sh

2
t/t5404-tracking-branches.sh

@ -36,7 +36,7 @@ test_expect_success 'prepare pushable branches' ' @@ -36,7 +36,7 @@ test_expect_success 'prepare pushable branches' '
'

test_expect_success 'mixed-success push returns error' '
test_must_fail git push
test_must_fail git push origin :
'

test_expect_success 'check tracking branches updated correctly after push' '

2
t/t5505-remote.sh

@ -345,7 +345,7 @@ test_expect_success 'fetch mirrors do not act as mirrors during push' ' @@ -345,7 +345,7 @@ test_expect_success 'fetch mirrors do not act as mirrors during push' '
) &&
(cd mirror-fetch/child &&
git branch -m renamed renamed2 &&
git push parent
git push parent :
) &&
(cd mirror-fetch/parent &&
git rev-parse --verify renamed &&

12
t/t5516-fetch-push.sh

@ -252,7 +252,7 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf @@ -252,7 +252,7 @@ test_expect_success 'push with pushInsteadOf and explicit pushurl (pushInsteadOf
test_expect_success 'push with matching heads' '

mk_test testrepo heads/master &&
git push testrepo &&
git push testrepo : &&
check_push_result testrepo $the_commit heads/master

'
@ -281,7 +281,7 @@ test_expect_success 'push --force with matching heads' ' @@ -281,7 +281,7 @@ test_expect_success 'push --force with matching heads' '
mk_test testrepo heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
git push --force testrepo &&
git push --force testrepo : &&
! check_push_result testrepo $the_commit heads/master &&
git reset --hard $the_commit

@ -504,6 +504,7 @@ test_expect_success 'push with remote.pushdefault' ' @@ -504,6 +504,7 @@ test_expect_success 'push with remote.pushdefault' '
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config remote.pushdefault down &&
test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result down_repo $the_commit heads/master
@ -515,7 +516,7 @@ test_expect_success 'push with config remote.*.pushurl' ' @@ -515,7 +516,7 @@ test_expect_success 'push with config remote.*.pushurl' '
git checkout master &&
test_config remote.there.url test2repo &&
test_config remote.there.pushurl testrepo &&
git push there &&
git push there : &&
check_push_result testrepo $the_commit heads/master
'

@ -528,6 +529,7 @@ test_expect_success 'push with config branch.*.pushremote' ' @@ -528,6 +529,7 @@ test_expect_success 'push with config branch.*.pushremote' '
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config branch.master.pushremote down &&
test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result side_repo $the_first_commit heads/master &&
@ -541,7 +543,7 @@ test_expect_success 'push with dry-run' ' @@ -541,7 +543,7 @@ test_expect_success 'push with dry-run' '
cd testrepo &&
old_commit=$(git show-ref -s --verify refs/heads/master)
) &&
git push --dry-run testrepo &&
git push --dry-run testrepo : &&
check_push_result testrepo $old_commit heads/master
'

@ -1022,7 +1024,7 @@ test_expect_success 'push --porcelain --dry-run rejected' ' @@ -1022,7 +1024,7 @@ test_expect_success 'push --porcelain --dry-run rejected' '

test_expect_success 'push --prune' '
mk_test testrepo heads/master heads/second heads/foo heads/bar &&
git push --prune testrepo &&
git push --prune testrepo : &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/second &&
! check_push_result testrepo $the_first_commit heads/foo heads/bar

2
t/t5517-push-mirror.sh

@ -256,7 +256,7 @@ test_expect_success 'remote.foo.mirror=no has no effect' ' @@ -256,7 +256,7 @@ test_expect_success 'remote.foo.mirror=no has no effect' '
git branch keep master &&
git push --mirror up &&
git branch -D keep &&
git push up
git push up :
) &&
(
cd mirror &&

12
t/t5519-push-alternates.sh

@ -40,7 +40,7 @@ test_expect_success 'alice works and pushes' ' @@ -40,7 +40,7 @@ test_expect_success 'alice works and pushes' '
cd alice-work &&
echo more >file &&
git commit -a -m second &&
git push ../alice-pub
git push ../alice-pub :
)
'

@ -57,7 +57,7 @@ test_expect_success 'bob fetches from alice, works and pushes' ' @@ -57,7 +57,7 @@ test_expect_success 'bob fetches from alice, works and pushes' '
git pull ../alice-pub master &&
echo more bob >file &&
git commit -a -m third &&
git push ../bob-pub
git push ../bob-pub :
) &&

# Check that the second commit by Alice is not sent
@ -86,7 +86,7 @@ test_expect_success 'alice works and pushes again' ' @@ -86,7 +86,7 @@ test_expect_success 'alice works and pushes again' '
cd alice-work &&
echo more alice >file &&
git commit -a -m fourth &&
git push ../alice-pub
git push ../alice-pub :
)
'

@ -99,7 +99,7 @@ test_expect_success 'bob works and pushes' ' @@ -99,7 +99,7 @@ test_expect_success 'bob works and pushes' '
cd bob-work &&
echo yet more bob >file &&
git commit -a -m fifth &&
git push ../bob-pub
git push ../bob-pub :
)
'

@ -115,7 +115,7 @@ test_expect_success 'alice works and pushes yet again' ' @@ -115,7 +115,7 @@ test_expect_success 'alice works and pushes yet again' '
git commit -a -m sixth.2 &&
echo more and more alice >>file &&
git commit -a -m sixth.3 &&
git push ../alice-pub
git push ../alice-pub :
)
'

@ -136,7 +136,7 @@ test_expect_success 'bob works and pushes again' ' @@ -136,7 +136,7 @@ test_expect_success 'bob works and pushes again' '
git hash-object -t commit -w commit &&
echo even more bob >file &&
git commit -a -m seventh &&
git push ../bob-pub
git push ../bob-pub :
)
'


1
t/t5531-deep-submodule-push.sh

@ -16,6 +16,7 @@ test_expect_success setup ' @@ -16,6 +16,7 @@ test_expect_success setup '
(
cd gar/bage &&
git init &&
git config push.default matching &&
>junk &&
git add junk &&
git commit -m "Initial junk"

1
t/t5550-http-fetch.sh

@ -13,6 +13,7 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5550'} @@ -13,6 +13,7 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5550'}
start_httpd

test_expect_success 'setup repository' '
git config push.default matching &&
echo content1 >file &&
git add file &&
git commit -m one

1
t/t5551-http-fetch.sh

@ -13,6 +13,7 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5551'} @@ -13,6 +13,7 @@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5551'}
start_httpd

test_expect_success 'setup repository' '
git config push.default matching &&
echo content >file &&
git add file &&
git commit -m one

1
t/t5570-git-daemon.sh

@ -8,6 +8,7 @@ LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-5570} @@ -8,6 +8,7 @@ LIB_GIT_DAEMON_PORT=${LIB_GIT_DAEMON_PORT-5570}
start_git_daemon

test_expect_success 'setup repository' '
git config push.default matching &&
echo content >file &&
git add file &&
git commit -m one

4
t/t7406-submodule-update.sh

@ -596,14 +596,14 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir recur @@ -596,14 +596,14 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir recur
git log > ../../../expected
) &&
git commit -m "added subsubmodule" &&
git push
git push origin :
) &&
(cd .git/modules/deeper/submodule/modules/subsubmodule &&
git log > ../../../../../actual
) &&
git add deeper/submodule &&
git commit -m "update submodule" &&
git push &&
git push origin : &&
test_cmp actual expected
)
'

1
t/t9400-git-cvsserver-server.sh

@ -36,6 +36,7 @@ export CVSROOT CVS_SERVER @@ -36,6 +36,7 @@ export CVSROOT CVS_SERVER

rm -rf "$CVSWORK" "$SERVERDIR"
test_expect_success 'setup' '
git config push.default matching &&
echo >empty &&
git add empty &&
git commit -q -m "First Commit" &&

1
t/t9401-git-cvsserver-crlf.sh

@ -84,6 +84,7 @@ export CVSROOT CVS_SERVER @@ -84,6 +84,7 @@ export CVSROOT CVS_SERVER

rm -rf "$CVSWORK" "$SERVERDIR"
test_expect_success 'setup' '
git config push.default matching &&
echo "Simple text file" >textfile.c &&
echo "File with embedded NUL: Q <- there" | q_to_nul > binfile.bin &&
mkdir subdir &&

Loading…
Cancel
Save