@matheusbsbs / matheus-bagliano / commits / 95775e5377
Fork 0

git-remote: do not complain on multiple URLs for a remote

Having more than one URL for a remote is perfectly normal when the remote is defined to push to multiple places. Get rid of the annoying "Warning" message. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 27, 2008 at 13:50 UTC 95775e5377960409a1b3ac4082dded7d17e14a46
1 file changed +3 -3
git-remote.perl
+3 -3
@@ -7,10 +7,10 @@ my $git = Git->repository();
7 sub add_remote_config {
8 my ($hash, $name, $what, $value) = @_;
9 if ($what eq 'url') {
10 - if (exists $hash->{$name}{'URL'}) {
11 - print STDERR "Warning: more than one remote.$name.url\n";
10 + # Having more than one is Ok -- it is used for push.
11 + if (! exists $hash->{'URL'}) {
12 + $hash->{$name}{'URL'} = $value;
13 }
13 - $hash->{$name}{'URL'} = $value;
14 }
15 elsif ($what eq 'fetch') {
16 $hash->{$name}{'FETCH'} ||= [];