git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] pathspec: rename per-item field has_wildcard to use_wildcard
Date: Thu, 7 Apr 2011 20:00:11 +0700	[thread overview]
Message-ID: <BANLkTinkdR4gg1=z-b4941Pppfsg+CgD-g@mail.gmail.com> (raw)
In-Reply-To: <4D9D9B60.4030404@drmicha.warpmail.net>

On Thu, Apr 7, 2011 at 6:09 PM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Junio, we're in rc phase ;)

He was excited. It's good, we may get this feature sooner :)

>>  (2) Colon, open parenthesis, a comma separated list of words to name
>>      magic, close parenthesis, followed by the path, e.g. these are the
>>      long-hand counterparts to the examples in (1)
>>
>>      - ":(top)hello.c"
>>      - ":(top,noglob)hello.c"
>>      - ":(noglob,top)hello.c"
>>      - ":(noglob,top):hello.c"
>>      - ":()hello.c"
>>
>
> Do we need the parentheses? I guess we need them to have the magic start
> with a non-alpha, otherwise we could do with ":top,noglob:hello.c"
> (which I like but breaks those with a file named ":top:hello.c").

That has something to do with "easy to parse and catch error", I
think. At the moment ":hello/:world" is interpreted as "hello/:world".
Without parentheses, we need to look further for colon and may
accidentally misinterpret it.

> What about these:
>
> :/(noglob)hello.c
> :(top)!hello.c
>
> I.e. do we allow combinations?

I think we should. I don't like typing long pathspecs, just because
only remember mnemonic for "top" and happen to need "noglob" too.

> It seems you accept to break people with files named ":(top)hello.c" but
> not those with files named ":top:hello.c". Which is OK if it's a
> conscious decision, of course.

At least once we agree on colon being the magic introducer and general
rules, we can do these earlier in 1.7.x

 - warn people that ":hello.c" may change semantics in future
 - recommend to escape ("::hello.c" instead of ":hello.c")
-- 
Duy

  reply	other threads:[~2011-04-07 13:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 22:10 [PATCH] pathspec: rename per-item field has_wildcard to use_wildcard Junio C Hamano
2011-04-06 15:54 ` Nguyen Thai Ngoc Duy
2011-04-06 17:13   ` Junio C Hamano
2011-04-06 19:52     ` Junio C Hamano
2011-04-07 11:09     ` Michael J Gruber
2011-04-07 13:00       ` Nguyen Thai Ngoc Duy [this message]
2011-04-07 19:44       ` Junio C Hamano
2011-04-07 19:47         ` Junio C Hamano
2011-04-08  8:29           ` Michael J Gruber
2011-04-08 19:40             ` Junio C Hamano
2011-04-07 12:51     ` Nguyen Thai Ngoc Duy

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTinkdR4gg1=z-b4941Pppfsg+CgD-g@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).