From: Junio C Hamano Date: Wed, 27 Feb 2008 21:50:44 +0000 (-0800) Subject: git-remote: do not complain on multiple URLs for a remote X-Git-Tag: v1.5.5-rc0~91^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95775e5377960409a1b3ac4082dded7d17e14a46;p=git.git 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 --- diff --git a/git-remote.perl b/git-remote.perl index 5cd69513c..b30ed734e 100755 --- a/git-remote.perl +++ b/git-remote.perl @@ -7,10 +7,10 @@ my $git = Git->repository(); sub add_remote_config { my ($hash, $name, $what, $value) = @_; if ($what eq 'url') { - if (exists $hash->{$name}{'URL'}) { - print STDERR "Warning: more than one remote.$name.url\n"; + # Having more than one is Ok -- it is used for push. + if (! exists $hash->{'URL'}) { + $hash->{$name}{'URL'} = $value; } - $hash->{$name}{'URL'} = $value; } elsif ($what eq 'fetch') { $hash->{$name}{'FETCH'} ||= [];