Skip to content

Commit e1ca424

Browse files
Michael J Grubergitster
authored andcommitted
t5516: Check pushurl config setting
Check whether the new remote.${remotename}.pushurl setting is obeyed and whether it overrides remote.${remotename}.url. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2034623 commit e1ca424

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

t/t5516-fetch-push.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,19 @@ test_expect_success 'push with config remote.*.push = HEAD' '
419419
git config --remove-section remote.there
420420
git config --remove-section branch.master
421421

422+
test_expect_success 'push with config remote.*.pushurl' '
423+
424+
mk_test heads/master &&
425+
git checkout master &&
426+
git config remote.there.url test2repo &&
427+
git config remote.there.pushurl testrepo &&
428+
git push there &&
429+
check_push_result $the_commit heads/master
430+
'
431+
432+
# clean up the cruft left with the previous one
433+
git config --remove-section remote.there
434+
422435
test_expect_success 'push with dry-run' '
423436
424437
mk_test heads/master &&

0 commit comments

Comments
 (0)