git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [RFC PATCH 0/4] pathspec labels [WAS: submodule groups]
Date: Mon, 16 May 2016 15:00:09 -0700	[thread overview]
Message-ID: <CAGZ79kbJxf6qnj1vqkbFzXBU+6Cfh6RMvs2NqqeASZAPLFXu8Q@mail.gmail.com> (raw)
In-Reply-To: <xmqqh9dx1xku.fsf@gitster.mtv.corp.google.com>

On Mon, May 16, 2016 at 2:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> And we want to have both "label=A B C" and attr:label=A B C" or *just* the
>> attr query?
>
> I think the choice at this point is between supporting just "label=A
> B C" or supporting just "attr:eol=crlf text=auto !diff".
>
> I think "attr:label=A" is merely a degenerated case of the latter.
>
>> We should not allow the user to add arbitrary attributes (i.e. labels).

Because we cannot extend our attributes any further from that?

Consider a user starts using attr <foo> for their labeling purposes.
Later (in 2 years) we decide that <foo> is an attribute we want to
use to mark files as foo-ish. so we add meaning to that attribute
(just like eol.crlf does an arbitrary thing, foo would do another arbitrary
thing).

Then the user picks up the new version of Git and expects <foo> to
still be a "I use it for labeling purposes only" thing. They would not
expect to all files labeled as <foo> to start behaving <foo-ish> ?

> Hmph, why not?

We need a namespace for which
* we can guarantee that it is for labeling purposes only (even in the future)
* is obvious to the user to be a labeling name space

Starting with "label" offers both?

>
>> Instead each of the "attr for labeling purposes" needs to follow a clear scheme
>> that allows us to add attributes later on that are outside of that scheme.
>
> That was my initial reaction when I saw Duy's "attr:crlf=auto" (by
> the way, there is no such setting; crlf should be one of TRUE, UNSET
> or set to string "input") idea.  But I do not think of a good
> argument to justify that arbitrary attributes are not allowed.

I agree that querying for attr:eol or attr:diff is a good idea.

I do however want to point out that all labels for "labeling purposes"
MUST be a clear from the beginning, otherwise we'll have the maintenance
problem down the road?

  reply	other threads:[~2016-05-16 22:00 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
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 [this message]
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=CAGZ79kbJxf6qnj1vqkbFzXBU+6Cfh6RMvs2NqqeASZAPLFXu8Q@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).