Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'

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

 



Nguyen Thai Ngoc Duy venit, vidit, dixit 02.03.2011 13:57:
> On Wed, Mar 2, 2011 at 7:34 PM, Sverre Rabbelier <srabbelier@xxxxxxxxx> wrote:
>> Heya,
>>
>> On Tue, Mar 1, 2011 at 16:01, Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> I have to say I'm really excited about how transparently this works
>>> across all kinds of commands, and how suggestive this is with rev:path
>>> in mind.
>>
>> I like it, especially considering how small the impact on the codebase
>> is. The downside is (once again) backwards compatibility though, I
>> haven't heard much on how to address that, other than "just quote it"
>> (which _I_ think is fine, people with filenames that start with fancy
>> characters are probably used to quoting them anyway)
> 
> Yeah. And if this is accepted, the "git add -u (without dot)" issue
> may cool down. I personally don't mind typing "git add -u :" (or "git
> add -u :/").

Why not even ":)"

Seriously, I'm glad this is gaining support. As for the notation, I
tried to take several things into account, which is only possible by
compromising somewhat on some:

- usability (as short as possible - 1 char optimum, 2 at most)

- suggestiveness, e.g. ":path" like in "rev:path" in line with git
usage, or "/path" in line with unix usage (although this has the wrong
connotation of being anchored at root)

- backward compatibility (new code does not misinterpret old notation)

- msysgit compatibility (I think "/" has issues)

- disambiguation from other notation (notably rev:path)

I ended up compromising slightly on the last one. Note that this does
not introduce additional ambiguities for existing use cases[*], only for
the new notation, i.e. commands expecting "treeish pathspec" need a
helping double dash when they are feed the new :pathspec without a treeish.

Michael

[*] I keep forgetting that some people may have files whose names begin
with ":". They are ambiguous now already with "treeish pathspec"
commands, but not with "pathspec" commands. The latter would change.
--
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]