Re: [PATCHv2] git-send-email: add ~/.authinfo parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 29, 2013, 22:38 UTC
- Message-ID
- <7vehh3obs0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <d58b0709cd86e0d336902b52d72e06dd9b52d70d.1359493459.git.mina86@mina86.com>
Michal Nazarewicz <mpn@google.com> writes:
Show 6 quoted lines
>> It is rather strange to require a comma-separated-values parser to >> read a file format this simple, isn't it? > > I was worried about spaces in password. CVS should handle such case > nicely, whereas simple split won't. Nonetheless, I guess that in the > end this is not likely enough to add the dependency.
But .netrc/.authinfo format separates its entries with SP, HT, or LF. An entry begins with "machine <remote-hostname>" token pair.
split(/\s+/) will not work for an entry that span multiple lines but CSV will not help, either.
Is it bad to use Net::Netrc instead? This looks like exactly the use case that module was written for, no?
Show 8 quoted lines
>> Perhaps you can convert at least some popular ones yourself? After >> all, the user may be using an _existing_ .authinfo/.netrc that she >> has been using with other programs that do understand symbolic port >> names. Rather than forcing all such users to update their files, >> the patch can work a bit harder for them and the world will be a >> better place, no? > > Parsing /etc/services added.
Hmph. I would have expected to see getservbyname.