Re: [regression] Re: git-cat-file --batch reversion; cannot query filenames with spaces

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

 



Junio C Hamano wrote:

> Here is what is on top of the revert that has been pushed out on
> 'pu'.

For what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

[...]
> To remain backwards compatible, we cannot split on whitespace by
> default, hence we will ship 1.8.4 with the commit reverted.
[...]
> It might be more robust to have something like "-z" to separate the
> input elements. But this patch is still a reasonable step before
> having that.  It makes the easy cases easy; people who do not care
> about %(rest) do not have to consider it, and the %(rest) code
> handles the spaces and newlines of "rev-list --objects" correctly.

Another idea for the future might be to start rejecting refnames
starting with a double-quote '"', which would make it safe to treat a
leading quote-mark as the start of a C-style quoted string.  But
currently that would technically be a breaking change, making "-z"
more useful in the meantime.

I think several commands already don't deal well with filenames with
newlines.  I hope POSIX forbids them (with some suitable migration
plan) soonish and even wouldn't mind if git were taught to refuse to
track them.

Thanks,
Jonathan
--
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]