summaryrefslogtreecommitdiff
path: root/git-remote.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-27 21:50:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-27 22:01:32 (GMT)
commit95775e5377960409a1b3ac4082dded7d17e14a46 (patch)
treeb33867f808aa46d6b5b380dcee25a11b00a9c78e /git-remote.perl
parent2db511fdbdbe1c8aab80f4bc13f0df037bce8a33 (diff)
downloadgit-95775e5377960409a1b3ac4082dded7d17e14a46.zip
git-95775e5377960409a1b3ac4082dded7d17e14a46.tar.gz
git-95775e5377960409a1b3ac4082dded7d17e14a46.tar.bz2
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>
Diffstat (limited to 'git-remote.perl')
-rwxr-xr-xgit-remote.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-remote.perl b/git-remote.perl
index 5cd6951..b30ed73 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'} ||= [];