Re: [PATCH] Quote LF in urls git fetch saves in FETCH_HEAD
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- May 13, 2009, 06:06 UTC
- Message-ID
- <81b0412b0905122306w4ed41bdiab073a05587fab55@mail.gmail.com>
- In-Reply-To
- <7vws8l7w0d.fsf@alter.siamese.dyndns.org>
2009/5/13 Junio C Hamano <gitster@pobox.com>:
Show 11 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> + for (i = 0; i < url_len; ++i)
>> + if ('\n' == url[i])
>> + fputs("\\n", fp);
>> + else
>> + fputc(url[i], fp);
>> + fputc('\n', fp);
>
> This ad-hoc quoting feels _very_ wrong. Who is on the reading side and
> how does it unquote?git fmt-merge-msg. It does not unquote. The url is purely informational here. OTOH, the \n shouldn't be in url text at all, so treat it as slightly less annoying warning.
> If it is just informational use only, then it might make more sense to > drop this ugly "quoted \n" silently. I dunno.
That'd mean to loose the information completely. Which is just as bad as putting the LF in the url in the first place.