1
0
mirror of https://github.com/git/git.git synced 2024-10-04 09:51:30 +02:00

Merge branch 'jc/remote-multi-url'

* jc/remote-multi-url:
  git-remote: do not complain on multiple URLs for a remote
This commit is contained in:
Junio C Hamano 2008-03-02 15:11:19 -08:00
commit ca132089d2

@ -7,11 +7,11 @@ 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;
}
}
elsif ($what eq 'fetch') {
$hash->{$name}{'FETCH'} ||= [];
push @{$hash->{$name}{'FETCH'}}, $value;