Re: [RFC PATCH 0/4] pathspec labels [WAS: submodule groups]
- From
Stefan Beller <sbeller@google.com>
- Date
- May 16, 2016, 17:48 UTC
- Message-ID
- <CAGZ79kZyPvAFG1TjSm76LuDLpch=7iuL_-8LYqysSESFQj-YjQ@mail.gmail.com>
- In-Reply-To
- <xmqqh9dx3nsf.fsf@gitster.mtv.corp.google.com>
On Mon, May 16, 2016 at 10:39 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
> Stefan Beller <sbeller@google.com> writes: > >> On Sun, May 15, 2016 at 3:06 AM, Duy Nguyen <pclouds@gmail.com> wrote: >>> Instead of putting everything in under the same attribute name >>> "label", make one attribute per label? Would this work? >>> >>> *.[ch] c-group code-group >>> >>> And the pathspec magic name can be simply "attr", any git attribute >>> can be used with it, e.g. :(attr:c-group) >> >> So you want to be able to query something like: >> >> git ls-files ":(crlf=auto)" >> >> as well? > > It would be more like > > git ls-files ":(attr:crlf=auto)" > > It certainly sounds tempting, even though I do not want to keep what > this initial chunk of the series needs to do to the minimum.
This is another case for using ':' instead of '='. So I think ':' is better for this future enhancement.
Also this future enhancement may ask for
git ls-files ":(attr:label=foo)"
or
git ls-files ":(attr:-label)"
so the user can circumvent the warn and ignore strategy. :(