Re: [PATCH] Quote LF in urls git fetch saves in FETCH_HEAD
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2009, 23:16 UTC
- Message-ID
- <7vws8l7w0d.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090512172452.GA32594@blimp.localdomain>
Alex Riesen <raa.lkml@gmail.com> writes:
Show 6 quoted lines
> + 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? If it uses quote.c infrastructure, we should be quoting using the function from the same library shouldn't we?
If it is just informational use only, then it might make more sense to drop this ugly "quoted \n" silently. I dunno.