3 test_description
='git remote porcelain-ish'
14 git commit
-m "Initial" &&
15 git checkout
-b side
&&
19 git commit
-m "Second" &&
25 echo "$1" |
tr ' ' '\012' |
sort |
sed -e '/^$/d' >expect
&&
26 echo "$2" |
tr ' ' '\012' |
sort |
sed -e '/^$/d' >actual
&&
27 test_cmp expect actual
30 check_remote_track
() {
31 actual
=$
(git remote show
"$1" |
sed -ne 's|^ \(.*\) tracked$|\1|p')
33 tokens_match
"$*" "$actual"
36 check_tracking_branch
() {
38 r
=$
(git for-each-ref
"--format=%(refname)" |
39 sed -ne "s|^refs/remotes/$1/||p") &&
41 tokens_match
"$*" "$r"
44 test_expect_success setup
'
46 setup_repository one &&
47 setup_repository two &&
49 cd two && git branch another
55 test_expect_success
'remote information for the origin' '
58 tokens_match origin "$(git remote)" &&
59 check_remote_track origin master side &&
60 check_tracking_branch origin HEAD master side
64 test_expect_success
'add another remote' '
67 git remote add -f second ../two &&
68 tokens_match "origin second" "$(git remote)" &&
69 check_remote_track origin master side &&
70 check_remote_track second master side another &&
71 check_tracking_branch second master side another &&
72 git for-each-ref "--format=%(refname)" refs/remotes |
73 sed -e "/^refs\/remotes\/origin\//d" \
74 -e "/^refs\/remotes\/second\//d" >actual &&
76 test_cmp expect actual
80 test_expect_success
'remote forces tracking branches' '
83 case `git config remote.second.fetch` in
90 test_expect_success
'remove remote' '
93 git symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&
98 test_expect_success
'remove remote' '
101 tokens_match origin "$(git remote)" &&
102 check_remote_track origin master side &&
103 git for-each-ref "--format=%(refname)" refs/remotes |
104 sed -e "/^refs\/remotes\/origin\//d" >actual &&
106 test_cmp expect actual
110 test_expect_success
'remove remote protects local branches' '
114 Note: A branch outside the refs/remotes/ hierarchy was not removed;
120 Note: Some branches outside the refs/remotes/ hierarchy were not removed;
122 git branch -d foobranch
127 git config --add remote.oops.fetch "+refs/*:refs/*" &&
128 git remote rm oops 2>actual1 &&
129 git branch foobranch &&
130 git config --add remote.oops.fetch "+refs/*:refs/*" &&
131 git remote rm oops 2>actual2 &&
132 git branch -d foobranch &&
134 test_cmp expect1 actual1 &&
135 test_cmp expect2 actual2
139 cat > test
/expect
<< EOF
141 Fetch URL: $(pwd)/one
145 master new (next fetch will store in remotes/origin)
147 Local branches configured for 'git pull':
148 ahead merges with remote master
149 master merges with remote master
150 octopus merges with remote topic-a
151 and with remote topic-b
152 and with remote topic-c
153 rebase rebases onto remote master
154 Local refs configured for 'git push':
155 master pushes to master (local out of date)
156 master pushes to upstream (create)
160 HEAD branch (remote HEAD is ambiguous, may be one of the following):
163 Local refs configured for 'git push':
164 ahead forces to master (fast-forwardable)
165 master pushes to another (up to date)
168 test_expect_success
'show' '
170 git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
172 git checkout -b ahead origin/master &&
175 git commit -m update file &&
176 git checkout master &&
177 git branch --track octopus origin/master &&
178 git branch --track rebase origin/master &&
179 git branch -d -r origin/master &&
180 git config --add remote.two.url ../two &&
181 git config --add remote.two.pushurl ../three &&
182 git config branch.rebase.rebase true &&
183 git config branch.octopus.merge "topic-a topic-b topic-c" &&
187 git commit -m update file) &&
188 git config --add remote.origin.push : &&
189 git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
190 git config --add remote.origin.push +refs/tags/lastbackup &&
191 git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
192 git config --add remote.two.push refs/heads/master:refs/heads/another &&
193 git remote show origin two > output &&
194 git branch -d rebase octopus &&
195 test_cmp expect output)
198 cat > test
/expect
<< EOF
200 Fetch URL: $(pwd)/one
202 HEAD branch: (not queried)
203 Remote branches: (status not queried)
206 Local branches configured for 'git pull':
207 ahead merges with remote master
208 master merges with remote master
209 Local refs configured for 'git push' (status not queried):
210 (matching) pushes to (matching)
211 refs/heads/master pushes to refs/heads/upstream
212 refs/tags/lastbackup forces to refs/tags/lastbackup
215 test_expect_success
'show -n' '
216 (mv one one.unreachable &&
218 git remote show -n origin > output &&
219 mv ../one.unreachable ../one &&
220 test_cmp expect output)
223 test_expect_success
'prune' '
225 git branch -m side side2) &&
228 git remote prune origin &&
229 git rev-parse refs/remotes/origin/side2 &&
230 test_must_fail git rev-parse refs/remotes/origin/side)
233 test_expect_success
'set-head --delete' '
235 git symbolic-ref refs/remotes/origin/HEAD &&
236 git remote set-head --delete origin &&
237 test_must_fail git symbolic-ref refs/remotes/origin/HEAD)
240 test_expect_success
'set-head --auto' '
242 git remote set-head --auto origin &&
243 echo refs/remotes/origin/master >expect &&
244 git symbolic-ref refs/remotes/origin/HEAD >output &&
245 test_cmp expect output
249 cat >test
/expect
<<EOF
250 error: Multiple remote HEAD branches. Please choose one explicitly with:
251 git remote set-head two another
252 git remote set-head two master
255 test_expect_success
'set-head --auto fails w/multiple HEADs' '
257 test_must_fail git remote set-head --auto two >output 2>&1 &&
258 test_cmp expect output)
261 cat >test
/expect
<<EOF
262 refs/remotes/origin/side2
265 test_expect_success
'set-head explicit' '
267 git remote set-head origin side2 &&
268 git symbolic-ref refs/remotes/origin/HEAD >output &&
269 git remote set-head origin master &&
270 test_cmp expect output)
273 cat > test
/expect
<< EOF
276 * [would prune] origin/side2
279 test_expect_success
'prune --dry-run' '
281 git branch -m side2 side) &&
283 git remote prune --dry-run origin > output &&
284 git rev-parse refs/remotes/origin/side2 &&
285 test_must_fail git rev-parse refs/remotes/origin/side &&
287 git branch -m side side2) &&
288 test_cmp expect output)
291 test_expect_success
'add --mirror && prune' '
295 git remote add --mirror -f origin ../one) &&
297 git branch -m side2 side) &&
299 git rev-parse --verify refs/heads/side2 &&
300 test_must_fail git rev-parse --verify refs/heads/side &&
302 git remote prune origin &&
303 test_must_fail git rev-parse --verify refs/heads/side2 &&
304 git rev-parse --verify refs/heads/side)
307 test_expect_success
'add --mirror=fetch' '
308 mkdir mirror-fetch &&
309 git init mirror-fetch/parent &&
310 (cd mirror-fetch/parent &&
312 git init --bare mirror-fetch/child &&
313 (cd mirror-fetch/child &&
314 git remote add --mirror=fetch -f parent ../parent)
317 test_expect_success
'fetch mirrors act as mirrors during fetch' '
318 (cd mirror-fetch/parent &&
320 git branch -m master renamed
322 (cd mirror-fetch/child &&
324 git rev-parse --verify refs/heads/new &&
325 git rev-parse --verify refs/heads/renamed
329 test_expect_success
'fetch mirrors can prune' '
330 (cd mirror-fetch/child &&
331 git remote prune parent &&
332 test_must_fail git rev-parse --verify refs/heads/master
336 test_expect_success
'fetch mirrors do not act as mirrors during push' '
337 (cd mirror-fetch/parent &&
340 (cd mirror-fetch/child &&
341 git branch -m renamed renamed2 &&
344 (cd mirror-fetch/parent &&
345 git rev-parse --verify renamed &&
346 test_must_fail git rev-parse --verify refs/heads/renamed2
350 test_expect_success
'add fetch mirror with specific branches' '
351 git init --bare mirror-fetch/track &&
352 (cd mirror-fetch/track &&
353 git remote add --mirror=fetch -t heads/new parent ../parent
357 test_expect_success
'fetch mirror respects specific branches' '
358 (cd mirror-fetch/track &&
360 git rev-parse --verify refs/heads/new &&
361 test_must_fail git rev-parse --verify refs/heads/renamed
365 test_expect_success
'add --mirror=push' '
367 git init --bare mirror-push/public &&
368 git init mirror-push/private &&
369 (cd mirror-push/private &&
371 git remote add --mirror=push public ../public
375 test_expect_success
'push mirrors act as mirrors during push' '
376 (cd mirror-push/private &&
378 git branch -m master renamed &&
381 (cd mirror-push/private &&
382 git rev-parse --verify refs/heads/new &&
383 git rev-parse --verify refs/heads/renamed &&
384 test_must_fail git rev-parse --verify refs/heads/master
388 test_expect_success
'push mirrors do not act as mirrors during fetch' '
389 (cd mirror-push/public &&
390 git branch -m renamed renamed2 &&
391 git symbolic-ref HEAD refs/heads/renamed2
393 (cd mirror-push/private &&
395 git rev-parse --verify refs/heads/renamed &&
396 test_must_fail git rev-parse --verify refs/heads/renamed2
400 test_expect_success
'push mirrors do not allow you to specify refs' '
401 git init mirror-push/track &&
402 (cd mirror-push/track &&
403 test_must_fail git remote add --mirror=push -t new public ../public
407 test_expect_success
'add alt && prune' '
411 git remote add -f origin ../one &&
412 git config remote.alt.url ../one &&
413 git config remote.alt.fetch "+refs/heads/*:refs/remotes/origin/*") &&
415 git branch -m side side2) &&
417 git rev-parse --verify refs/remotes/origin/side &&
418 test_must_fail git rev-parse --verify refs/remotes/origin/side2 &&
420 git remote prune alt &&
421 test_must_fail git rev-parse --verify refs/remotes/origin/side &&
422 git rev-parse --verify refs/remotes/origin/side2)
425 cat >test
/expect
<<\EOF
429 test_expect_success
'add with reachable tags (default)' '
433 git commit -m "Foobar" &&
434 git tag -a -m "Foobar tag" foobar-tag &&
435 git reset --hard HEAD~1 &&
436 git tag -a -m "Some tag" some-tag) &&
440 git remote add -f origin ../one &&
441 git tag -l some-tag >../test/output &&
442 git tag -l foobar-tag >>../test/output &&
443 test_must_fail git config remote.origin.tagopt) &&
444 test_cmp test/expect test/output
447 cat >test
/expect
<<\EOF
453 test_expect_success
'add --tags' '
458 git remote add -f --tags origin ../one &&
459 git tag -l some-tag >../test/output &&
460 git tag -l foobar-tag >>../test/output &&
461 git config remote.origin.tagopt >>../test/output) &&
462 test_cmp test/expect test/output
465 cat >test
/expect
<<\EOF
469 test_expect_success
'add --no-tags' '
474 git remote add -f --no-tags origin ../one &&
475 git tag -l some-tag >../test/output &&
476 git tag -l foobar-tag >../test/output &&
477 git config remote.origin.tagopt >>../test/output) &&
479 git tag -d some-tag foobar-tag) &&
480 test_cmp test/expect test/output
483 test_expect_success
'reject --no-no-tags' '
485 test_must_fail git remote add -f --no-no-tags neworigin ../one)
488 cat > one
/expect
<< EOF
496 test_expect_success
'update' '
499 git remote add drosophila ../two &&
500 git remote add apis ../mirror &&
502 git branch -r > output &&
503 test_cmp expect output)
507 cat > one
/expect
<< EOF
517 test_expect_success
'update with arguments' '
520 for b in $(git branch -r)
522 git branch -r -d $b || break
524 git remote add manduca ../mirror &&
525 git remote add megaloprepus ../mirror &&
526 git config remotes.phobaeticus "drosophila megaloprepus" &&
527 git config remotes.titanus manduca &&
528 git remote update phobaeticus titanus &&
529 git branch -r > output &&
530 test_cmp expect output)
534 test_expect_success
'update --prune' '
537 git branch -m side2 side3) &&
539 git remote update --prune &&
540 (cd ../one && git branch -m side3 side2) &&
541 git rev-parse refs/remotes/origin/side3 &&
542 test_must_fail git rev-parse refs/remotes/origin/side2)
545 cat > one
/expect
<< EOF
554 test_expect_success
'update default' '
557 for b in $(git branch -r)
559 git branch -r -d $b || break
561 git config remote.drosophila.skipDefaultUpdate true &&
562 git remote update default &&
563 git branch -r > output &&
564 test_cmp expect output)
568 cat > one
/expect
<< EOF
574 test_expect_success
'update default (overridden, with funny whitespace)' '
577 for b in $(git branch -r)
579 git branch -r -d $b || break
581 git config remotes.default "$(printf "\t drosophila \n")" &&
582 git remote update default &&
583 git branch -r > output &&
584 test_cmp expect output)
588 test_expect_success
'update (with remotes.default defined)' '
591 for b in $(git branch -r)
593 git branch -r -d $b || break
595 git config remotes.default "drosophila" &&
597 git branch -r > output &&
598 test_cmp expect output)
602 test_expect_success
'"remote show" does not show symbolic refs' '
604 git clone one three &&
606 git remote show origin > output &&
607 ! grep "^ *HEAD$" < output &&
608 ! grep -i stale < output)
612 test_expect_success
'reject adding remote with an invalid name' '
614 test_must_fail git remote add some:url desired-name
618 # The first three test if the tracking branches are properly renamed,
619 # the last two ones check if the config is updated.
621 test_expect_success
'rename a remote' '
623 git clone one four &&
625 git remote rename origin upstream &&
626 rmdir .git/refs/remotes/origin &&
627 test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&
628 test "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&
629 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&
630 test "$(git config branch.master.remote)" = "upstream")
634 test_expect_success
'rename does not update a non-default fetch refspec' '
636 git clone one four.one &&
638 git config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&
639 git remote rename origin upstream &&
640 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/heads/origin/*")
644 test_expect_success
'rename a remote with name part of fetch spec' '
646 git clone one four.two &&
648 git remote rename origin remote &&
649 git remote rename remote upstream &&
650 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*")
654 cat > remotes_origin
<< EOF
656 Push: refs/heads/master:refs/heads/upstream
657 Pull: refs/heads/master:refs/heads/origin
660 test_expect_success
'migrate a remote from named file in $GIT_DIR/remotes' '
661 git clone one five &&
662 origin_url=$(pwd)/one &&
664 git remote rm origin &&
665 mkdir -p .git/remotes &&
666 cat ../remotes_origin > .git/remotes/origin &&
667 git remote rename origin origin &&
668 ! test -f .git/remotes/origin &&
669 test "$(git config remote.origin.url)" = "$origin_url" &&
670 test "$(git config remote.origin.push)" = "refs/heads/master:refs/heads/upstream" &&
671 test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin")
674 test_expect_success
'migrate a remote from named file in $GIT_DIR/branches' '
676 origin_url=$(pwd)/one &&
678 git remote rm origin &&
679 echo "$origin_url" > .git/branches/origin &&
680 git remote rename origin origin &&
681 ! test -f .git/branches/origin &&
682 test "$(git config remote.origin.url)" = "$origin_url" &&
683 test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin")
686 test_expect_success
'remote prune to cause a dangling symref' '
687 git clone one seven &&
690 git checkout side2 &&
695 git remote prune origin
697 grep "has become dangling" err &&
699 : And the dangling symref will not cause other annoying errors &&
704 ! grep "points nowhere" err &&
707 test_must_fail git branch nomore origin
709 grep "dangling symref" err
712 test_expect_success
'show empty remote' '
714 test_create_repo empty &&
715 git clone empty empty-clone &&
718 git remote show origin
722 test_expect_success
'remote set-branches requires a remote' '
723 test_must_fail git remote set-branches &&
724 test_must_fail git remote set-branches --add
727 test_expect_success
'remote set-branches' '
728 echo "+refs/heads/*:refs/remotes/scratch/*" >expect.initial &&
729 sort <<-\EOF >expect.add &&
730 +refs/heads/*:refs/remotes/scratch/*
731 +refs/heads/other:refs/remotes/scratch/other
733 sort <<-\EOF >expect.replace &&
734 +refs/heads/maint:refs/remotes/scratch/maint
735 +refs/heads/master:refs/remotes/scratch/master
736 +refs/heads/next:refs/remotes/scratch/next
738 sort <<-\EOF >expect.add-two &&
739 +refs/heads/maint:refs/remotes/scratch/maint
740 +refs/heads/master:refs/remotes/scratch/master
741 +refs/heads/next:refs/remotes/scratch/next
742 +refs/heads/pu:refs/remotes/scratch/pu
743 +refs/heads/t/topic:refs/remotes/scratch/t/topic
745 sort <<-\EOF >expect.setup-ffonly &&
746 refs/heads/master:refs/remotes/scratch/master
747 +refs/heads/next:refs/remotes/scratch/next
749 sort <<-\EOF >expect.respect-ffonly &&
750 refs/heads/master:refs/remotes/scratch/master
751 +refs/heads/next:refs/remotes/scratch/next
752 +refs/heads/pu:refs/remotes/scratch/pu
755 git clone .git/ setbranches &&
758 git remote rename origin scratch &&
759 git config --get-all remote.scratch.fetch >config-result &&
760 sort <config-result >../actual.initial &&
762 git remote set-branches scratch --add other &&
763 git config --get-all remote.scratch.fetch >config-result &&
764 sort <config-result >../actual.add &&
766 git remote set-branches scratch maint master next &&
767 git config --get-all remote.scratch.fetch >config-result &&
768 sort <config-result >../actual.replace &&
770 git remote set-branches --add scratch pu t/topic &&
771 git config --get-all remote.scratch.fetch >config-result &&
772 sort <config-result >../actual.add-two &&
774 git config --unset-all remote.scratch.fetch &&
775 git config remote.scratch.fetch \
776 refs/heads/master:refs/remotes/scratch/master &&
777 git config --add remote.scratch.fetch \
778 +refs/heads/next:refs/remotes/scratch/next &&
779 git config --get-all remote.scratch.fetch >config-result &&
780 sort <config-result >../actual.setup-ffonly &&
782 git remote set-branches --add scratch pu &&
783 git config --get-all remote.scratch.fetch >config-result &&
784 sort <config-result >../actual.respect-ffonly
786 test_cmp expect.initial actual.initial &&
787 test_cmp expect.add actual.add &&
788 test_cmp expect.replace actual.replace &&
789 test_cmp expect.add-two actual.add-two &&
790 test_cmp expect.setup-ffonly actual.setup-ffonly &&
791 test_cmp expect.respect-ffonly actual.respect-ffonly
794 test_expect_success
'remote set-branches with --mirror' '
795 echo "+refs/*:refs/*" >expect.initial &&
796 echo "+refs/heads/master:refs/heads/master" >expect.replace &&
797 git clone --mirror .git/ setbranches-mirror &&
799 cd setbranches-mirror &&
800 git remote rename origin scratch &&
801 git config --get-all remote.scratch.fetch >../actual.initial &&
803 git remote set-branches scratch heads/master &&
804 git config --get-all remote.scratch.fetch >../actual.replace
806 test_cmp expect.initial actual.initial &&
807 test_cmp expect.replace actual.replace
810 test_expect_success
'new remote' '
811 git remote add someremote foo &&
813 git config --get-all remote.someremote.url >actual &&
817 test_expect_success
'remote set-url bar' '
818 git remote set-url someremote bar &&
820 git config --get-all remote.someremote.url >actual &&
824 test_expect_success
'remote set-url baz bar' '
825 git remote set-url someremote baz bar &&
827 git config --get-all remote.someremote.url >actual &&
831 test_expect_success
'remote set-url zot bar' '
832 test_must_fail git remote set-url someremote zot bar &&
834 git config --get-all remote.someremote.url >actual &&
838 test_expect_success
'remote set-url --push zot baz' '
839 test_must_fail git remote set-url --push someremote zot baz &&
840 echo "YYY" >expect &&
842 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
843 echo "YYY" >>actual &&
844 git config --get-all remote.someremote.url >>actual &&
848 test_expect_success
'remote set-url --push zot' '
849 git remote set-url --push someremote zot &&
851 echo "YYY" >>expect &&
853 git config --get-all remote.someremote.pushurl >actual &&
854 echo "YYY" >>actual &&
855 git config --get-all remote.someremote.url >>actual &&
859 test_expect_success
'remote set-url --push qux zot' '
860 git remote set-url --push someremote qux zot &&
862 echo "YYY" >>expect &&
864 git config --get-all remote.someremote.pushurl >actual &&
865 echo "YYY" >>actual &&
866 git config --get-all remote.someremote.url >>actual &&
870 test_expect_success
'remote set-url --push foo qu+x' '
871 git remote set-url --push someremote foo qu+x &&
873 echo "YYY" >>expect &&
875 git config --get-all remote.someremote.pushurl >actual &&
876 echo "YYY" >>actual &&
877 git config --get-all remote.someremote.url >>actual &&
881 test_expect_success
'remote set-url --push --add aaa' '
882 git remote set-url --push --add someremote aaa &&
885 echo "YYY" >>expect &&
887 git config --get-all remote.someremote.pushurl >actual &&
888 echo "YYY" >>actual &&
889 git config --get-all remote.someremote.url >>actual &&
893 test_expect_success
'remote set-url --push bar aaa' '
894 git remote set-url --push someremote bar aaa &&
897 echo "YYY" >>expect &&
899 git config --get-all remote.someremote.pushurl >actual &&
900 echo "YYY" >>actual &&
901 git config --get-all remote.someremote.url >>actual &&
905 test_expect_success
'remote set-url --push --delete bar' '
906 git remote set-url --push --delete someremote bar &&
908 echo "YYY" >>expect &&
910 git config --get-all remote.someremote.pushurl >actual &&
911 echo "YYY" >>actual &&
912 git config --get-all remote.someremote.url >>actual &&
916 test_expect_success
'remote set-url --push --delete foo' '
917 git remote set-url --push --delete someremote foo &&
918 echo "YYY" >expect &&
920 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
921 echo "YYY" >>actual &&
922 git config --get-all remote.someremote.url >>actual &&
926 test_expect_success
'remote set-url --add bbb' '
927 git remote set-url --add someremote bbb &&
928 echo "YYY" >expect &&
931 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
932 echo "YYY" >>actual &&
933 git config --get-all remote.someremote.url >>actual &&
937 test_expect_success
'remote set-url --delete .*' '
938 test_must_fail git remote set-url --delete someremote .\* &&
939 echo "YYY" >expect &&
942 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
943 echo "YYY" >>actual &&
944 git config --get-all remote.someremote.url >>actual &&
948 test_expect_success
'remote set-url --delete bbb' '
949 git remote set-url --delete someremote bbb &&
950 echo "YYY" >expect &&
952 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
953 echo "YYY" >>actual &&
954 git config --get-all remote.someremote.url >>actual &&
958 test_expect_success
'remote set-url --delete baz' '
959 test_must_fail git remote set-url --delete someremote baz &&
960 echo "YYY" >expect &&
962 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
963 echo "YYY" >>actual &&
964 git config --get-all remote.someremote.url >>actual &&
968 test_expect_success
'remote set-url --add ccc' '
969 git remote set-url --add someremote ccc &&
970 echo "YYY" >expect &&
973 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
974 echo "YYY" >>actual &&
975 git config --get-all remote.someremote.url >>actual &&
979 test_expect_success
'remote set-url --delete baz' '
980 git remote set-url --delete someremote baz &&
981 echo "YYY" >expect &&
983 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
984 echo "YYY" >>actual &&
985 git config --get-all remote.someremote.url >>actual &&