From: Junio C Hamano Date: Tue, 12 May 2009 23:16:02 GMT Subject: Re: [PATCH] Quote LF in urls git fetch saves in FETCH_HEAD Message-ID: <7vws8l7w0d.fsf@alter.siamese.dyndns.org> In-Reply-To: <20090512172452.GA32594@blimp.localdomain> Alex Riesen 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? 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.