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]

 



On Tue, Mar 1, 2011 at 6:57 PM, Michael J Gruber
<git@xxxxxxxxxxxxxxxxxxxx> wrote:
> HEAD:path is repo wide already
>
> :path is also, after this patch
>
> Note that when you have a file named :foo now, it can already be
> mistaken as the blob at "foo" in the index (or HEAD) already, in places
> where rev:path makes sense. So you would need quotation before my patch.

No. ':foo' as a reference to 'foo' in index is a SHA1-extended syntax
and I think we try to avoid ambiguation when a sha1-extended syntax
may look like a path or vice versa.

>> Another, less cryptic choice, is to make these special notations
>> separate from true pathspecs. For example, instead of ":foo" we can
>> say "--root foo". get_pathspec() and friends can be updated to remove
>> --root and rewrite the next pathspec. Extensibility is obvious.
>
> Only that some commands have "--root" as an option, and even if not,
> it's just too much to type.

Yes, choose one between cryptic/short and descriptive/long :)

>> Back to what I'm writing above, '-' may be chosen over ':' even
>> without separation because UNIXers are trained that '-' is usually the
>> beginning of something special, I suppose most of us would go with
>> ./-blah for file names.
>
> If ":" is crazy which is in line with our current notation, then how do
> you call "-"? "-" is
>
> - a short option identifier
> - a negation (attributes)
> - a notation for stdin

'-' is crazy, not ':'. Perhaps I'm embracing '-' too much.
-- 
Duy
--
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]