From: Michael J Gruber <git@drmicha.warpmail.net>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'
Date: Tue, 01 Mar 2011 12:57:20 +0100 [thread overview]
Message-ID: <4D6CDF20.3020701@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTinke05gcQbrDLSUoBUus5gnx+ci5830766d2Jqs@mail.gmail.com>
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@drmicha.warpmail.net> wrote:
>> Nguyen Thai Ngoc Duy venit, vidit, dixit 01.03.2011 12:13:
>>> 2011/3/1 Michael J Gruber <git@drmicha.warpmail.net>:
>>>> 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
next prev parent reply other threads:[~2011-03-01 12:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 0:17 git-grep to operate across who repository and not just CWD? David Chanters
2011-02-28 9:27 ` Michael J Gruber
2011-02-28 15:27 ` Jay Soffian
2011-02-28 18:32 ` Junio C Hamano
2011-02-28 18:38 ` Junio C Hamano
2011-02-28 22:25 ` Phil Hord
2011-03-01 8:05 ` Michael J Gruber
2011-03-01 8:16 ` Nguyen Thai Ngoc Duy
2011-03-01 8:54 ` Michael J Gruber
2011-03-01 9:32 ` Nguyen Thai Ngoc Duy
2011-03-01 9:44 ` Nguyen Thai Ngoc Duy
2011-03-01 9:53 ` [PATCH/POC 0/2] grep --full-tree Michael J Gruber
2011-03-01 9:53 ` [PATCH/RFC 1/2] grep: --full-tree Michael J Gruber
2011-03-01 9:53 ` [PATCH/RFC 2/2] grep: make --full-tree work with pathspecs Michael J Gruber
2011-03-01 19:20 ` Junio C Hamano
2011-03-01 10:21 ` [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':' Michael J Gruber
2011-03-01 11:13 ` Nguyen Thai Ngoc Duy
2011-03-01 11:16 ` Michael J Gruber
2011-03-01 11:50 ` Nguyen Thai Ngoc Duy
2011-03-01 11:57 ` Michael J Gruber [this message]
2011-03-01 12:08 ` Nguyen Thai Ngoc Duy
2011-03-01 14:50 ` Junio C Hamano
2011-03-01 15:01 ` Michael J Gruber
2011-03-01 20:00 ` Junio C Hamano
2011-03-02 12:34 ` Sverre Rabbelier
2011-03-02 12:57 ` Nguyen Thai Ngoc Duy
2011-03-02 13:12 ` Michael J Gruber
2011-03-02 16:53 ` Junio C Hamano
2011-03-02 17:31 ` Michael J Gruber
2011-03-03 2:42 ` Miles Bader
2011-03-03 3:52 ` Junio C Hamano
2011-03-03 3:44 ` Phil Hord
2011-03-03 8:20 ` Michael J Gruber
2011-03-01 16:25 ` Phil Hord
2011-03-01 18:31 ` James Pickens
2011-03-02 0:12 ` Nguyen Thai Ngoc Duy
2011-03-03 3:51 ` Phil Hord
2011-03-03 8:21 ` Michael J Gruber
2011-03-01 11:49 ` Michael J Gruber
2011-03-01 13:05 ` Phil Hord
2011-03-23 15:32 ` [PATCH] pathspec: reserve some letters after a colon pathspec Nguyễn Thái Ngọc Duy
2011-03-23 18:04 ` Junio C Hamano
2011-03-24 7:15 ` Michael J Gruber
2011-03-24 7:49 ` Nguyen Thai Ngoc Duy
2011-03-24 8:12 ` Junio C Hamano
2011-03-24 14:46 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D6CDF20.3020701@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).