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 C_LOCALE_OUTPUT '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_tracking_branch second master side another &&
70 git for-each-ref "--format=%(refname)" refs/remotes |
71 sed -e "/^refs\/remotes\/origin\//d" \
72 -e "/^refs\/remotes\/second\//d" >actual &&
74 test_cmp expect actual
78 test_expect_success C_LOCALE_OUTPUT 'check remote tracking' '
81 check_remote_track origin master side &&
82 check_remote_track second master side another
86 test_expect_success 'remote forces tracking branches' '
89 case `git config remote.second.fetch` in
96 test_expect_success 'remove remote' '
99 git symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&
104 test_expect_success C_LOCALE_OUTPUT 'remove remote' '
107 tokens_match origin "$(git remote)" &&
108 check_remote_track origin master side &&
109 git for-each-ref "--format=%(refname)" refs/remotes |
110 sed -e "/^refs\/remotes\/origin\//d" >actual &&
112 test_cmp expect actual
116 test_expect_success 'remove remote protects local branches' '
120 Note: A branch outside the refs/remotes/ hierarchy was not removed;
126 Note: Some branches outside the refs/remotes/ hierarchy were not removed;
128 git branch -d foobranch
133 git config --add remote.oops.fetch "+refs/*:refs/*" &&
134 git remote rm oops 2>actual1 &&
135 git branch foobranch &&
136 git config --add remote.oops.fetch "+refs/*:refs/*" &&
137 git remote rm oops 2>actual2 &&
138 git branch -d foobranch &&
140 test_i18ncmp expect1 actual1 &&
141 test_i18ncmp expect2 actual2
145 cat > test/expect << EOF
147 Fetch URL: $(pwd)/one
151 master new (next fetch will store in remotes/origin)
153 Local branches configured for 'git pull':
154 ahead merges with remote master
155 master merges with remote master
156 octopus merges with remote topic-a
157 and with remote topic-b
158 and with remote topic-c
159 rebase rebases onto remote master
160 Local refs configured for 'git push':
161 master pushes to master (local out of date)
162 master pushes to upstream (create)
166 HEAD branch (remote HEAD is ambiguous, may be one of the following):
169 Local refs configured for 'git push':
170 ahead forces to master (fast-forwardable)
171 master pushes to another (up to date)
174 test_expect_success 'show' '
176 git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
178 git checkout -b ahead origin/master &&
181 git commit -m update file &&
182 git checkout master &&
183 git branch --track octopus origin/master &&
184 git branch --track rebase origin/master &&
185 git branch -d -r origin/master &&
186 git config --add remote.two.url ../two &&
187 git config --add remote.two.pushurl ../three &&
188 git config branch.rebase.rebase true &&
189 git config branch.octopus.merge "topic-a topic-b topic-c" &&
193 git commit -m update file) &&
194 git config --add remote.origin.push : &&
195 git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
196 git config --add remote.origin.push +refs/tags/lastbackup &&
197 git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
198 git config --add remote.two.push refs/heads/master:refs/heads/another &&
199 git remote show origin two > output &&
200 git branch -d rebase octopus &&
201 test_i18ncmp expect output)
204 cat > test/expect << EOF
206 Fetch URL: $(pwd)/one
208 HEAD branch: (not queried)
209 Remote branches: (status not queried)
212 Local branches configured for 'git pull':
213 ahead merges with remote master
214 master merges with remote master
215 Local refs configured for 'git push' (status not queried):
216 (matching) pushes to (matching)
217 refs/heads/master pushes to refs/heads/upstream
218 refs/tags/lastbackup forces to refs/tags/lastbackup
221 test_expect_success 'show -n' '
222 (mv one one.unreachable &&
224 git remote show -n origin > output &&
225 mv ../one.unreachable ../one &&
226 test_i18ncmp expect output)
229 test_expect_success 'prune' '
231 git branch -m side side2) &&
234 git remote prune origin &&
235 git rev-parse refs/remotes/origin/side2 &&
236 test_must_fail git rev-parse refs/remotes/origin/side)
239 test_expect_success 'set-head --delete' '
241 git symbolic-ref refs/remotes/origin/HEAD &&
242 git remote set-head --delete origin &&
243 test_must_fail git symbolic-ref refs/remotes/origin/HEAD)
246 test_expect_success 'set-head --auto' '
248 git remote set-head --auto origin &&
249 echo refs/remotes/origin/master >expect &&
250 git symbolic-ref refs/remotes/origin/HEAD >output &&
251 test_cmp expect output
255 cat >test/expect <<EOF
256 error: Multiple remote HEAD branches. Please choose one explicitly with:
257 git remote set-head two another
258 git remote set-head two master
261 test_expect_success 'set-head --auto fails w/multiple HEADs' '
263 test_must_fail git remote set-head --auto two >output 2>&1 &&
264 test_i18ncmp expect output)
267 cat >test/expect <<EOF
268 refs/remotes/origin/side2
271 test_expect_success 'set-head explicit' '
273 git remote set-head origin side2 &&
274 git symbolic-ref refs/remotes/origin/HEAD >output &&
275 git remote set-head origin master &&
276 test_cmp expect output)
279 cat > test/expect << EOF
282 * [would prune] origin/side2
285 test_expect_success 'prune --dry-run' '
287 git branch -m side2 side) &&
289 git remote prune --dry-run origin > output &&
290 git rev-parse refs/remotes/origin/side2 &&
291 test_must_fail git rev-parse refs/remotes/origin/side &&
293 git branch -m side side2) &&
294 test_i18ncmp expect output)
297 test_expect_success 'add --mirror && prune' '
301 git remote add --mirror -f origin ../one) &&
303 git branch -m side2 side) &&
305 git rev-parse --verify refs/heads/side2 &&
306 test_must_fail git rev-parse --verify refs/heads/side &&
308 git remote prune origin &&
309 test_must_fail git rev-parse --verify refs/heads/side2 &&
310 git rev-parse --verify refs/heads/side)
313 test_expect_success 'add --mirror=fetch' '
314 mkdir mirror-fetch &&
315 git init mirror-fetch/parent &&
316 (cd mirror-fetch/parent &&
318 git init --bare mirror-fetch/child &&
319 (cd mirror-fetch/child &&
320 git remote add --mirror=fetch -f parent ../parent)
323 test_expect_success 'fetch mirrors act as mirrors during fetch' '
324 (cd mirror-fetch/parent &&
326 git branch -m master renamed
328 (cd mirror-fetch/child &&
330 git rev-parse --verify refs/heads/new &&
331 git rev-parse --verify refs/heads/renamed
335 test_expect_success 'fetch mirrors can prune' '
336 (cd mirror-fetch/child &&
337 git remote prune parent &&
338 test_must_fail git rev-parse --verify refs/heads/master
342 test_expect_success 'fetch mirrors do not act as mirrors during push' '
343 (cd mirror-fetch/parent &&
346 (cd mirror-fetch/child &&
347 git branch -m renamed renamed2 &&
350 (cd mirror-fetch/parent &&
351 git rev-parse --verify renamed &&
352 test_must_fail git rev-parse --verify refs/heads/renamed2
356 test_expect_success 'add fetch mirror with specific branches' '
357 git init --bare mirror-fetch/track &&
358 (cd mirror-fetch/track &&
359 git remote add --mirror=fetch -t heads/new parent ../parent
363 test_expect_success 'fetch mirror respects specific branches' '
364 (cd mirror-fetch/track &&
366 git rev-parse --verify refs/heads/new &&
367 test_must_fail git rev-parse --verify refs/heads/renamed
371 test_expect_success 'add --mirror=push' '
373 git init --bare mirror-push/public &&
374 git init mirror-push/private &&
375 (cd mirror-push/private &&
377 git remote add --mirror=push public ../public
381 test_expect_success 'push mirrors act as mirrors during push' '
382 (cd mirror-push/private &&
384 git branch -m master renamed &&
387 (cd mirror-push/private &&
388 git rev-parse --verify refs/heads/new &&
389 git rev-parse --verify refs/heads/renamed &&
390 test_must_fail git rev-parse --verify refs/heads/master
394 test_expect_success 'push mirrors do not act as mirrors during fetch' '
395 (cd mirror-push/public &&
396 git branch -m renamed renamed2 &&
397 git symbolic-ref HEAD refs/heads/renamed2
399 (cd mirror-push/private &&
401 git rev-parse --verify refs/heads/renamed &&
402 test_must_fail git rev-parse --verify refs/heads/renamed2
406 test_expect_success 'push mirrors do not allow you to specify refs' '
407 git init mirror-push/track &&
408 (cd mirror-push/track &&
409 test_must_fail git remote add --mirror=push -t new public ../public
413 test_expect_success 'add alt && prune' '
417 git remote add -f origin ../one &&
418 git config remote.alt.url ../one &&
419 git config remote.alt.fetch "+refs/heads/*:refs/remotes/origin/*") &&
421 git branch -m side side2) &&
423 git rev-parse --verify refs/remotes/origin/side &&
424 test_must_fail git rev-parse --verify refs/remotes/origin/side2 &&
426 git remote prune alt &&
427 test_must_fail git rev-parse --verify refs/remotes/origin/side &&
428 git rev-parse --verify refs/remotes/origin/side2)
431 cat >test/expect <<\EOF
435 test_expect_success 'add with reachable tags (default)' '
439 git commit -m "Foobar" &&
440 git tag -a -m "Foobar tag" foobar-tag &&
441 git reset --hard HEAD~1 &&
442 git tag -a -m "Some tag" some-tag) &&
446 git remote add -f origin ../one &&
447 git tag -l some-tag >../test/output &&
448 git tag -l foobar-tag >>../test/output &&
449 test_must_fail git config remote.origin.tagopt) &&
450 test_cmp test/expect test/output
453 cat >test/expect <<\EOF
459 test_expect_success 'add --tags' '
464 git remote add -f --tags origin ../one &&
465 git tag -l some-tag >../test/output &&
466 git tag -l foobar-tag >>../test/output &&
467 git config remote.origin.tagopt >>../test/output) &&
468 test_cmp test/expect test/output
471 cat >test/expect <<\EOF
475 test_expect_success 'add --no-tags' '
480 git remote add -f --no-tags origin ../one &&
481 git tag -l some-tag >../test/output &&
482 git tag -l foobar-tag >../test/output &&
483 git config remote.origin.tagopt >>../test/output) &&
485 git tag -d some-tag foobar-tag) &&
486 test_cmp test/expect test/output
489 test_expect_success 'reject --no-no-tags' '
491 test_must_fail git remote add -f --no-no-tags neworigin ../one)
494 cat > one/expect << EOF
502 test_expect_success 'update' '
505 git remote add drosophila ../two &&
506 git remote add apis ../mirror &&
508 git branch -r > output &&
509 test_cmp expect output)
513 cat > one/expect << EOF
523 test_expect_success 'update with arguments' '
526 for b in $(git branch -r)
528 git branch -r -d $b || break
530 git remote add manduca ../mirror &&
531 git remote add megaloprepus ../mirror &&
532 git config remotes.phobaeticus "drosophila megaloprepus" &&
533 git config remotes.titanus manduca &&
534 git remote update phobaeticus titanus &&
535 git branch -r > output &&
536 test_cmp expect output)
540 test_expect_success 'update --prune' '
543 git branch -m side2 side3) &&
545 git remote update --prune &&
546 (cd ../one && git branch -m side3 side2) &&
547 git rev-parse refs/remotes/origin/side3 &&
548 test_must_fail git rev-parse refs/remotes/origin/side2)
551 cat > one/expect << EOF
560 test_expect_success 'update default' '
563 for b in $(git branch -r)
565 git branch -r -d $b || break
567 git config remote.drosophila.skipDefaultUpdate true &&
568 git remote update default &&
569 git branch -r > output &&
570 test_cmp expect output)
574 cat > one/expect << EOF
580 test_expect_success 'update default (overridden, with funny whitespace)' '
583 for b in $(git branch -r)
585 git branch -r -d $b || break
587 git config remotes.default "$(printf "\t drosophila \n")" &&
588 git remote update default &&
589 git branch -r > output &&
590 test_cmp expect output)
594 test_expect_success 'update (with remotes.default defined)' '
597 for b in $(git branch -r)
599 git branch -r -d $b || break
601 git config remotes.default "drosophila" &&
603 git branch -r > output &&
604 test_cmp expect output)
608 test_expect_success '"remote show" does not show symbolic refs' '
610 git clone one three &&
612 git remote show origin > output &&
613 ! grep "^ *HEAD$" < output &&
614 ! grep -i stale < output)
618 test_expect_success 'reject adding remote with an invalid name' '
620 test_must_fail git remote add some:url desired-name
624 # The first three test if the tracking branches are properly renamed,
625 # the last two ones check if the config is updated.
627 test_expect_success 'rename a remote' '
629 git clone one four &&
631 git remote rename origin upstream &&
632 rmdir .git/refs/remotes/origin &&
633 test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&
634 test "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&
635 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&
636 test "$(git config branch.master.remote)" = "upstream")
640 test_expect_success 'rename does not update a non-default fetch refspec' '
642 git clone one four.one &&
644 git config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&
645 git remote rename origin upstream &&
646 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/heads/origin/*" &&
647 git rev-parse -q origin/master)
651 test_expect_success 'rename a remote with name part of fetch spec' '
653 git clone one four.two &&
655 git remote rename origin remote &&
656 git remote rename remote upstream &&
657 test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*")
661 test_expect_success 'rename a remote with name prefix of other remote' '
663 git clone one four.three &&
665 git remote add o git://example.com/repo.git &&
666 git remote rename o upstream &&
667 test "$(git rev-parse origin/master)" = "$(git rev-parse master)")
671 cat > remotes_origin << EOF
673 Push: refs/heads/master:refs/heads/upstream
674 Pull: refs/heads/master:refs/heads/origin
677 test_expect_success 'migrate a remote from named file in $GIT_DIR/remotes' '
678 git clone one five &&
679 origin_url=$(pwd)/one &&
681 git remote rm origin &&
682 mkdir -p .git/remotes &&
683 cat ../remotes_origin > .git/remotes/origin &&
684 git remote rename origin origin &&
685 ! test -f .git/remotes/origin &&
686 test "$(git config remote.origin.url)" = "$origin_url" &&
687 test "$(git config remote.origin.push)" = "refs/heads/master:refs/heads/upstream" &&
688 test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin")
691 test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
693 origin_url=$(pwd)/one &&
695 git remote rm origin &&
696 echo "$origin_url" > .git/branches/origin &&
697 git remote rename origin origin &&
698 ! test -f .git/branches/origin &&
699 test "$(git config remote.origin.url)" = "$origin_url" &&
700 test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin")
703 test_expect_success 'remote prune to cause a dangling symref' '
704 git clone one seven &&
707 git checkout side2 &&
712 git remote prune origin
714 test_i18ngrep "has become dangling" err &&
716 : And the dangling symref will not cause other annoying errors &&
721 ! grep "points nowhere" err &&
724 test_must_fail git branch nomore origin
726 grep "dangling symref" err
729 test_expect_success 'show empty remote' '
731 test_create_repo empty &&
732 git clone empty empty-clone &&
735 git remote show origin
739 test_expect_success 'remote set-branches requires a remote' '
740 test_must_fail git remote set-branches &&
741 test_must_fail git remote set-branches --add
744 test_expect_success 'remote set-branches' '
745 echo "+refs/heads/*:refs/remotes/scratch/*" >expect.initial &&
746 sort <<-\EOF >expect.add &&
747 +refs/heads/*:refs/remotes/scratch/*
748 +refs/heads/other:refs/remotes/scratch/other
750 sort <<-\EOF >expect.replace &&
751 +refs/heads/maint:refs/remotes/scratch/maint
752 +refs/heads/master:refs/remotes/scratch/master
753 +refs/heads/next:refs/remotes/scratch/next
755 sort <<-\EOF >expect.add-two &&
756 +refs/heads/maint:refs/remotes/scratch/maint
757 +refs/heads/master:refs/remotes/scratch/master
758 +refs/heads/next:refs/remotes/scratch/next
759 +refs/heads/pu:refs/remotes/scratch/pu
760 +refs/heads/t/topic:refs/remotes/scratch/t/topic
762 sort <<-\EOF >expect.setup-ffonly &&
763 refs/heads/master:refs/remotes/scratch/master
764 +refs/heads/next:refs/remotes/scratch/next
766 sort <<-\EOF >expect.respect-ffonly &&
767 refs/heads/master:refs/remotes/scratch/master
768 +refs/heads/next:refs/remotes/scratch/next
769 +refs/heads/pu:refs/remotes/scratch/pu
772 git clone .git/ setbranches &&
775 git remote rename origin scratch &&
776 git config --get-all remote.scratch.fetch >config-result &&
777 sort <config-result >../actual.initial &&
779 git remote set-branches scratch --add other &&
780 git config --get-all remote.scratch.fetch >config-result &&
781 sort <config-result >../actual.add &&
783 git remote set-branches scratch maint master next &&
784 git config --get-all remote.scratch.fetch >config-result &&
785 sort <config-result >../actual.replace &&
787 git remote set-branches --add scratch pu t/topic &&
788 git config --get-all remote.scratch.fetch >config-result &&
789 sort <config-result >../actual.add-two &&
791 git config --unset-all remote.scratch.fetch &&
792 git config remote.scratch.fetch \
793 refs/heads/master:refs/remotes/scratch/master &&
794 git config --add remote.scratch.fetch \
795 +refs/heads/next:refs/remotes/scratch/next &&
796 git config --get-all remote.scratch.fetch >config-result &&
797 sort <config-result >../actual.setup-ffonly &&
799 git remote set-branches --add scratch pu &&
800 git config --get-all remote.scratch.fetch >config-result &&
801 sort <config-result >../actual.respect-ffonly
803 test_cmp expect.initial actual.initial &&
804 test_cmp expect.add actual.add &&
805 test_cmp expect.replace actual.replace &&
806 test_cmp expect.add-two actual.add-two &&
807 test_cmp expect.setup-ffonly actual.setup-ffonly &&
808 test_cmp expect.respect-ffonly actual.respect-ffonly
811 test_expect_success 'remote set-branches with --mirror' '
812 echo "+refs/*:refs/*" >expect.initial &&
813 echo "+refs/heads/master:refs/heads/master" >expect.replace &&
814 git clone --mirror .git/ setbranches-mirror &&
816 cd setbranches-mirror &&
817 git remote rename origin scratch &&
818 git config --get-all remote.scratch.fetch >../actual.initial &&
820 git remote set-branches scratch heads/master &&
821 git config --get-all remote.scratch.fetch >../actual.replace
823 test_cmp expect.initial actual.initial &&
824 test_cmp expect.replace actual.replace
827 test_expect_success 'new remote' '
828 git remote add someremote foo &&
830 git config --get-all remote.someremote.url >actual &&
834 test_expect_success 'remote set-url bar' '
835 git remote set-url someremote bar &&
837 git config --get-all remote.someremote.url >actual &&
841 test_expect_success 'remote set-url baz bar' '
842 git remote set-url someremote baz bar &&
844 git config --get-all remote.someremote.url >actual &&
848 test_expect_success 'remote set-url zot bar' '
849 test_must_fail git remote set-url someremote zot bar &&
851 git config --get-all remote.someremote.url >actual &&
855 test_expect_success 'remote set-url --push zot baz' '
856 test_must_fail git remote set-url --push someremote zot baz &&
857 echo "YYY" >expect &&
859 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
860 echo "YYY" >>actual &&
861 git config --get-all remote.someremote.url >>actual &&
865 test_expect_success 'remote set-url --push zot' '
866 git remote set-url --push someremote zot &&
868 echo "YYY" >>expect &&
870 git config --get-all remote.someremote.pushurl >actual &&
871 echo "YYY" >>actual &&
872 git config --get-all remote.someremote.url >>actual &&
876 test_expect_success 'remote set-url --push qux zot' '
877 git remote set-url --push someremote qux zot &&
879 echo "YYY" >>expect &&
881 git config --get-all remote.someremote.pushurl >actual &&
882 echo "YYY" >>actual &&
883 git config --get-all remote.someremote.url >>actual &&
887 test_expect_success 'remote set-url --push foo qu+x' '
888 git remote set-url --push someremote foo qu+x &&
890 echo "YYY" >>expect &&
892 git config --get-all remote.someremote.pushurl >actual &&
893 echo "YYY" >>actual &&
894 git config --get-all remote.someremote.url >>actual &&
898 test_expect_success 'remote set-url --push --add aaa' '
899 git remote set-url --push --add someremote aaa &&
902 echo "YYY" >>expect &&
904 git config --get-all remote.someremote.pushurl >actual &&
905 echo "YYY" >>actual &&
906 git config --get-all remote.someremote.url >>actual &&
910 test_expect_success 'remote set-url --push bar aaa' '
911 git remote set-url --push someremote bar aaa &&
914 echo "YYY" >>expect &&
916 git config --get-all remote.someremote.pushurl >actual &&
917 echo "YYY" >>actual &&
918 git config --get-all remote.someremote.url >>actual &&
922 test_expect_success 'remote set-url --push --delete bar' '
923 git remote set-url --push --delete someremote bar &&
925 echo "YYY" >>expect &&
927 git config --get-all remote.someremote.pushurl >actual &&
928 echo "YYY" >>actual &&
929 git config --get-all remote.someremote.url >>actual &&
933 test_expect_success 'remote set-url --push --delete foo' '
934 git remote set-url --push --delete someremote foo &&
935 echo "YYY" >expect &&
937 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
938 echo "YYY" >>actual &&
939 git config --get-all remote.someremote.url >>actual &&
943 test_expect_success 'remote set-url --add bbb' '
944 git remote set-url --add someremote bbb &&
945 echo "YYY" >expect &&
948 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
949 echo "YYY" >>actual &&
950 git config --get-all remote.someremote.url >>actual &&
954 test_expect_success 'remote set-url --delete .*' '
955 test_must_fail git remote set-url --delete someremote .\* &&
956 echo "YYY" >expect &&
959 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
960 echo "YYY" >>actual &&
961 git config --get-all remote.someremote.url >>actual &&
965 test_expect_success 'remote set-url --delete bbb' '
966 git remote set-url --delete someremote bbb &&
967 echo "YYY" >expect &&
969 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
970 echo "YYY" >>actual &&
971 git config --get-all remote.someremote.url >>actual &&
975 test_expect_success 'remote set-url --delete baz' '
976 test_must_fail git remote set-url --delete someremote baz &&
977 echo "YYY" >expect &&
979 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
980 echo "YYY" >>actual &&
981 git config --get-all remote.someremote.url >>actual &&
985 test_expect_success 'remote set-url --add ccc' '
986 git remote set-url --add someremote ccc &&
987 echo "YYY" >expect &&
990 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
991 echo "YYY" >>actual &&
992 git config --get-all remote.someremote.url >>actual &&
996 test_expect_success 'remote set-url --delete baz' '
997 git remote set-url --delete someremote baz &&
998 echo "YYY" >expect &&
1000 test_must_fail git config --get-all remote.someremote.pushurl >actual &&
1001 echo "YYY" >>actual &&
1002 git config --get-all remote.someremote.url >>actual &&