{"thread":{"id":"12346","subject":"[PATCH] git-remote: do not complain on multiple URLs for a remote","startedAt":"2008-02-27T21:55:30Z","lastAt":"2008-02-27T22:51:49Z","messageCount":3,"participants":["Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"70161","messageId":"7v3arerrn1.fsf@gitster.siamese.dyndns.org","threadId":"12346","inReplyTo":null,"subject":"[PATCH] git-remote: do not complain on multiple URLs for a remote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-27T21:55:30Z","receivedAt":"2008-02-27T21:55:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Having more than one URL for a remote is perfectly normal when\nthe remote is defined to push to multiple places.  Get rid of\nthe annoying \"Warning\" message.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-remote.perl |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-remote.perl b/git-remote.perl\nindex 5cd6951..b30ed73 100755\n--- a/git-remote.perl\n+++ b/git-remote.perl\n@@ -7,10 +7,10 @@ my $git = Git->repository();\n sub add_remote_config {\n \tmy ($hash, $name, $what, $value) = @_;\n \tif ($what eq 'url') {\n-\t\tif (exists $hash->{$name}{'URL'}) {\n-\t\t\tprint STDERR \"Warning: more than one remote.$name.url\\n\";\n+\t\t# Having more than one is Ok -- it is used for push.\n+\t\tif (! exists $hash->{'URL'}) {\n+\t\t\t$hash->{$name}{'URL'} = $value;\n \t\t}\n-\t\t$hash->{$name}{'URL'} = $value;\n \t}\n \telsif ($what eq 'fetch') {\n \t\t$hash->{$name}{'FETCH'} ||= [];\n-- \n1.5.4.3.339.gad2d1\n"},{"id":"70166","messageId":"alpine.LSU.1.00.0802272219120.22527@racer.site","threadId":"12346","inReplyTo":"7v3arerrn1.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git-remote: do not complain on multiple URLs for a remote","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T22:19:58Z","receivedAt":"2008-02-27T22:19:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Junio C Hamano wrote:\n\n> +\t\tif (! exists $hash->{'URL'}) {\n\nIs it preferred style now to add a space after \"!\"?\n\nBTW I take this patch as a hint that I should resurrect builtin-remote...\n\nThanks,\nDscho\n"},{"id":"70172","messageId":"7vwsoqovwa.fsf@gitster.siamese.dyndns.org","threadId":"12346","inReplyTo":"alpine.LSU.1.00.0802272219120.22527@racer.site","subject":"Re: [PATCH] git-remote: do not complain on multiple URLs for a remote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-27T22:51:49Z","receivedAt":"2008-02-27T22:51:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Wed, 27 Feb 2008, Junio C Hamano wrote:\n>\n>> +\t\tif (! exists $hash->{'URL'}) {\n>\n> Is it preferred style now to add a space after \"!\"?\n\nNo, just a copied line from another codepath.\n"}]}