Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-remote: do not complain on multiple URLs for a remote
author
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Feb 2008 21:50:44 +0000
(13:50 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Feb 2008 22:01:32 +0000
(14:01 -0800)
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>
git-remote.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
2db511f
)
diff --git
a/git-remote.perl
b/git-remote.perl
index 5cd69513cf84111d1152d07f8cda77b201ffc416..b30ed734e7102b6a5d88c01364fa7d18db8f8bfe 100755
(executable)
--- a/
git-remote.perl
+++ b/
git-remote.perl
@@
-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'} ||= [];