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 01.03.2011 12:50:
> On Tue, Mar 1, 2011 at 6:16 PM, Michael J Gruber
> <git@xxxxxxxxxxxxxxxxxxxx> wrote:
>> Nguyen Thai Ngoc Duy venit, vidit, dixit 01.03.2011 12:13:
>>> 2011/3/1 Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>:
>>>> Introduce a leading ':' as the notation for repo-wide pathspecs.
>>>>
>>>> This is in line with our treeish:path notation which defaults to
>>>> repowide paths.
>>>>
>>>> Heck: Even ':./path' works for pathspecs, and I have no clue why!
>>>
>>> If you are going to turn pathspecs into something more complex,
>>> reserve room for future extension. I have negative pathspecs that can
>>> utilize it.
>>>
>>> I take it, from now on people must refer file name ':foo' as './:foo'
>>> with your patch?
>>
>> That is up for discussion, of course. When discussing a new approach for
>> file mode dependent attributes, I was hoping to get through with
>> symlink:path, and did not. But it was decided that something like
>> :symlink:path would be good enough, in the sense of avoiding enough
>> possible conflicts. That made me hope that :path would be, too.
> 
> Take me down. I'm going crazy now.

What is crazy about that?

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.

> 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.

> Problems are plenty:
> 
>  - may be confused with command line options without "--" as separator
> ("-:" on the other hand is not, but looks weird)
>  - '-' is not a reserved letter, the same as ':'
>  - ...
> 
>> (I have not checked for interaction of those two, which are in flight.)
>>
>> I would think that file names like ":foo" are problematic on msys
>> already, so in a sense they are no-no already, and free to take as
>> special notation.
> 
> 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

Michael
--
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]