From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
"git\@vger.kernel.org" <git@vger.kernel.org>,
Jonathan Nieder <jrnieder@gmail.com>,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH 4/4] pathspec: record labels
Date: Thu, 12 May 2016 23:28:13 -0700 [thread overview]
Message-ID: <xmqqtwi2a2v6.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kbaqw9UvYrCWcLtAXaiw5-aSev9gn858zz5Ju0MVfzepQ@mail.gmail.com> (Stefan Beller's message of "Thu, 12 May 2016 22:41:13 -0700")
Stefan Beller <sbeller@google.com> writes:
> Would it make sense to mark a file as
>
> "follows the labeling system, but has no label" (TRUE)
> "doesn't follow the labeling system at all" (FALSE)
Isn't the former be "label="
I do not know what you mean by the latter. I would understand
"pretend this has all the labels under the sun", though.
>> Ahh, you are making ":(label=...)makefile" to say "paths must
>> match the string 'makefile' in some way, and further the paths
>> must have all these labels? Then falling through is correct.
>
> This is how I understood your initial design idea.
>
> :(label=C_code)contrib/
>
> gives all the retired C programs.
OK, you probably meant s/C program/shell script/ with a different
label, but I think I got the idea.
> I wonder that you focus on the details already, but not on the grand
> design of things. "Is it actually a sane thing I am proposing here?"
> Though you may be biased as the the high level idea came from
> you. :)
Biased is the primary reason ;-) I trust that other reviewers can
stop me and correct course when I veer off the deep end by myself.
Just like you called this as a "mock", I am treating this as a
testbed to let you try out the "defaultGroup" thing to see how
flexibly you can express common wishes the end users have, i.e.
"does it give us an expressive enough system to replace repo?"
is the question I want this code to help answering. And that is
why I was trying to make sure it is good enough quickly.
> One of the things I switched last minute and tried to address in
> the cover letter is the semantics of ORing or ANDing the labels
> given within one pathspec item.
That is something we may find out that the other way is more useful,
or your final choice is better, by seeing how easy to express common
patterns of submodule selections. Perhaps we might end up wanting
both, but as you said, OR can be given by listing the same path with
differnt required-labels so I think what you have is good enough for
us to start experimenting with the higher layer.
One worry I have is that historically pathspec matching and
attribute matching have both been very hard to make it perform well.
The placement of string_list_has_string() and load_labels() at the
leaf level of the pathspec matching logic cannot be helped, but
these calls might turn out to be an unacceptable performance
bottleneck. But it is a bit too early to worry about that, I think.
next prev parent reply other threads:[~2016-05-13 6:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 0:19 [RFC PATCH 0/4] pathspec labels [WAS: submodule groups] Stefan Beller
2016-05-13 0:19 ` [PATCH 1/4] Documentation: correct typo in example for querying attributes Stefan Beller
2016-05-13 0:19 ` [PATCH 2/4] pathspec: move long magic parsing out of prefix_pathspec Stefan Beller
2016-05-13 0:19 ` [PATCH 3/4] pathspec: move prefix check out of the inner loop Stefan Beller
2016-05-13 4:43 ` Junio C Hamano
2016-05-13 0:19 ` [PATCH 4/4] pathspec: record labels Stefan Beller
2016-05-13 4:32 ` Junio C Hamano
2016-05-13 5:26 ` Stefan Beller
2016-05-13 5:26 ` Junio C Hamano
2016-05-13 5:41 ` Stefan Beller
2016-05-13 6:28 ` Junio C Hamano [this message]
2016-05-15 10:06 ` [RFC PATCH 0/4] pathspec labels [WAS: submodule groups] Duy Nguyen
2016-05-15 18:19 ` Junio C Hamano
2016-05-15 19:33 ` Junio C Hamano
2016-05-16 0:03 ` Duy Nguyen
2016-05-16 17:20 ` Stefan Beller
2016-05-16 17:39 ` Junio C Hamano
2016-05-16 17:48 ` Stefan Beller
2016-05-16 21:18 ` Junio C Hamano
2016-05-16 21:36 ` Stefan Beller
2016-05-16 21:50 ` Junio C Hamano
2016-05-16 22:00 ` Stefan Beller
2016-05-16 22:02 ` Junio C Hamano
2016-05-16 22:09 ` Stefan Beller
2016-05-16 22:19 ` 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=xmqqtwi2a2v6.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=sbeller@google.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.