Re: [RFC PATCH 0/4] pathspec labels [WAS: submodule groups]

2 messages, 2 authors, 2016-06-16 · open the first message on its own page

Re: [RFC PATCH 0/4] pathspec labels [WAS: submodule groups]

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:24

Junio C Hamano [off-list ref] writes:
Duy Nguyen [off-list ref] writes:
quoted
Instead of putting everything in under the same attribute name
"label", make one attribute per label? Would this work?

*.[ch] c-group code-group
The attribute subsystem expects that there will not be unbounded
large number of attributes, so this is not a good direction to go.
Having said that, I do not mind too much if it turns out that it is
necessary to use an unbounded set of random attributes to solve a
specific problem, if the use case is good.

But even then, in order to avoid confusion and name clashes, I'd
prefer to see more like

	*.[ch] group-c group-code

that is matched by

	git cmd ':(group:c code)

i.e. reserve a single prefix that is not and will not be used for
other purposes.

Re: [RFC PATCH 0/4] pathspec labels [WAS: submodule groups]

From: Duy Nguyen <hidden>
Date: 2016-06-16 02:19:24

On Mon, May 16, 2016 at 2:33 AM, Junio C Hamano [off-list ref] wrote:
Junio C Hamano [off-list ref] writes:
quoted
Duy Nguyen [off-list ref] writes:
quoted
Instead of putting everything in under the same attribute name
"label", make one attribute per label? Would this work?

*.[ch] c-group code-group
The attribute subsystem expects that there will not be unbounded
large number of attributes, so this is not a good direction to go.
Having said that, I do not mind too much if it turns out that it is
necessary to use an unbounded set of random attributes to solve a
specific problem, if the use case is good.
I only have a vague idea so far, it seems to me a good idea to be able
to specify "binary-marked paths" or "filter attached paths" from
pathspec. We can already do this with scripts, but we need to be very
careful about quoting. And if it's pathspec it can be combined with
other magic (most likely negation)
But even then, in order to avoid confusion and name clashes, I'd
prefer to see more like

        *.[ch] group-c group-code

that is matched by

        git cmd ':(group:c code)

i.e. reserve a single prefix that is not and will not be used for
other purposes.
For my above use case, i can still define macro group-binary that is
an alias of binary to get around this. So it's ok.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help