Re: [PATCH] Quote LF in urls git fetch saves in FETCH_HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/5/13 Daniel Barkalow <barkalow@xxxxxxxxxxxx>:
> On Wed, 13 May 2009, Alex Riesen wrote:
>> 2009/5/13 Junio C Hamano <gitster@xxxxxxxxx>:
>>
>> > 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.
>
> Looking back at the original message, it looks like the user included a
> newline in an argument to clone, and the fetch must have stripped it out
> (or ignored it in some other fashion), because data was retrieved from a
> repository that doesn't have a newline in its name.

_That_ looks like a bug to me. We should have asked exactly the name
we were given, or notify the user about what we have used for the url
if we have ignored user's input and decided to use something else.
Patches follow.

> ... Most likely, the
> newline should just be prohibited in the URL in the config file in the
> first place, and we shouldn't be able to get to the point of writing a
> FETCH_HEAD with that value.

What I cannot understand is what's wrong with url containing an LF?
Especially if we can handle it, all the tools can handle it, and putting
LF in a filename is a long-standing UNIX tradition.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]