From: Michael J Gruber <git@drmicha.warpmail.net>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [WIP PATCH 0/5] support --exclude for diff/log commands
Date: Mon, 21 Mar 2011 10:45:53 +0100 [thread overview]
Message-ID: <4D871E51.8090106@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTimWPoMEYdLCwTTit6AeuJegOc96gE1JsO8B4fh=@mail.gmail.com>
Nguyen Thai Ngoc Duy venit, vidit, dixit 21.03.2011 05:02:
> On Thu, Mar 10, 2011 at 5:05 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>> 2011/3/10 Junio C Hamano <gitster@pobox.com>:
>>> Let's step back a bit.
>>>
>>> We chose to use ":/<regexp>" as one new form of extended SHA-1 expression
>>> to name an object for two reasons: (1) no normal <ref> can have a colon in
>>> it, because of check-ref-format restriction; (2) ":" is an unlikely letter
>>> to appear at the beginning of a pathname, and people with such a path can
>>> work around by saying "./:frotz" or "\:xyzzy".
>>>
>>> There is a disambiguation logic to check a list of arguments that lacks an
>>> explicit "--" separator to make sure that each element early on the list
>>> can only be interpreted as an object name but not as a pathname that
>>> exists on the filesystem, and all the remaining elements are pathnames
>>> that exist on the filesystem.
>>>
>>> If we introduce an extended syntax for pathspec and make the prefix magic
>>> character ":", and if we choose to use ":/" as one kind of magic, I was a
>>> bit worried that this may affect the disambiguation. The users must use
>>> an explicit "--" when feeding a pathspec with the magic so that the parser
>>> knows which kind of magic (either object name magic or pathspec magic)
>>> they are talking about.
>>
>> Or.. we can consider this ':' a special form of wildcard and interpret
>> the same way:
>>
>> - first try exact match. If it matches, the leading ':' is
>> interpreted literally as part of file name.
>> - magic.
>
> One thing that makes it different from Michael's approach is, :/foo
> will match ':/foo' literally in every directories and foo at top-tree.
> I feel mildly uncomfortable with it, but it makes it consistent with
> other wildcards. If no one objects, I'll try to make a patch with this
> approach.
Maybe I misunderstand which topic you are referring to. I have a patch
for ":" (to denote repo-root in pathspecs), there's no need to make
another one for ":/". (I would really prefer to do it myself since I
brought it up.) I was just waiting for agreement to settle in about
which prefix to use. Also, I have checked with J&J of mingw/msysgit fame
meanwhile to make sure that the notation does not create problems on the
windows side of git.
Michael
next prev parent reply other threads:[~2011-03-21 9:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 3:13 [WIP PATCH 0/5] support --exclude for diff/log commands Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 1/5] tree-walk: support negative pathspec Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 2/5] match_pathspec_depth: " Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 3/5] revision.c: get rid of struct rev_info.prune_data Nguyễn Thái Ngọc Duy
2011-03-10 6:20 ` Junio C Hamano
2011-03-10 6:52 ` Nguyen Thai Ngoc Duy
2011-03-10 3:13 ` [PATCH 4/5] diff: refactor init/release API Nguyễn Thái Ngọc Duy
2011-03-10 3:13 ` [PATCH 5/5] diff: support --exclude Nguyễn Thái Ngọc Duy
2011-03-10 6:11 ` [WIP PATCH 0/5] support --exclude for diff/log commands Junio C Hamano
2011-03-10 7:03 ` Nguyen Thai Ngoc Duy
2011-03-10 8:41 ` Junio C Hamano
2011-03-10 10:05 ` Nguyen Thai Ngoc Duy
2011-03-21 4:02 ` Nguyen Thai Ngoc Duy
2011-03-21 9:45 ` Michael J Gruber [this message]
2011-03-21 10:02 ` Nguyen Thai Ngoc Duy
2011-03-22 23:59 ` Junio C Hamano
2011-03-23 12:10 ` Nguyen Thai Ngoc Duy
2011-03-23 12:18 ` Nguyen Thai Ngoc Duy
2011-03-23 12:51 ` Michael J Gruber
2011-03-23 13:34 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D871E51.8090106@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 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.