Skip to content

Commit

Permalink
git-remote: do not complain on multiple URLs for a remote
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 27, 2008
1 parent 2db511f commit 95775e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git-remote.perl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
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'} ||= [];
Expand Down

0 comments on commit 95775e5

Please sign in to comment.