All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: [RFC] Refspec patterns with * in the middle
Date: Mon, 02 Mar 2009 14:39:24 -0800	[thread overview]
Message-ID: <7v1vtfmtwj.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <76718490903021407u215fb769g656a8fdc20e622e5@mail.gmail.com> (Jay Soffian's message of "Mon, 2 Mar 2009 17:07:31 -0500")

Jay Soffian <jaysoffian@gmail.com> writes:

> On Mon, Mar 2, 2009 at 1:25 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
>>> But the following is not:
>>>
>>>  - foo/bar*/baz
>>>
>>> IOW, '*' can only appear as a non-terminating symbol if it is bounded
>>> by '/' on each side.
>>
>> You have my criterion right, but I want that to be valid, but only match
>> things like "foo/bar-something/baz", not "foo/bar-a/b/baz".
>
> Ah, that makes sense. Perhaps use "**" to mean matching across path
> components which is what rsync does:
>
>  o  a '*' matches any non-empty path component (it stops at slashes).
>  o  use '**' to match anything, including slashes.
>
> ?

I personally do not think that makes much sense (and I find ** ugly, too).

We traditionally supported '*' only at the end, and it always has meant
"match through the end, including slashes".

Requiring 'match including slashes' to be spelled as '**' only when it is
not at the end is unnecessarily confusing.

Is there a valid use case when * wants to match across directory
boundaries when it is not at the end?  I offhand do not think of a sane
one.

So, it might make it easiest to understand if we say * usually does not
match slash, except when it is used at the end immediately after a slash,
in which case it means "match through the end".

  reply	other threads:[~2009-03-02 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-01 23:42 [RFC] Refspec patterns with * in the middle Daniel Barkalow
2009-03-02 12:54 ` Jay Soffian
2009-03-02 17:08 ` Junio C Hamano
2009-03-02 18:01   ` Jay Soffian
2009-03-02 18:25     ` Daniel Barkalow
2009-03-02 22:07       ` Jay Soffian
2009-03-02 22:39         ` Junio C Hamano [this message]
2009-03-02 22:58           ` Jay Soffian
2009-03-02 23:00           ` Daniel Barkalow
2009-03-02 23:30             ` Junio C Hamano
2009-03-03 16:25               ` David Kastrup
2009-03-02 18:22   ` Daniel Barkalow

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=7v1vtfmtwj.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.