git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stefan Beller <sbeller@google.com>
Date
May 16, 2016, 22:00 UTC
Message-ID
<CAGZ79kbJxf6qnj1vqkbFzXBU+6Cfh6RMvs2NqqeASZAPLFXu8Q@mail.gmail.com>
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:
Show 11 quoted lines
> 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?
Show 8 quoted lines
>
>> 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?

Previous: Junio C HamanoNext: Junio C Hamano
Message 22 of 25 in “pathspec labels [WAS: submodule groups]”
  1. 0/4 pathspec labels [WAS: submodule groups]Stefan Beller, May 13, 2016
  2. 1/4 Documentation: correct typo in example for querying attributesStefan Beller, May 13, 2016
  3. 2/4 pathspec: move long magic parsing out of prefix_pathspecStefan Beller, May 13, 2016
  4. 3/4 pathspec: move prefix check out of the inner loopStefan Beller, May 13, 2016
  5. Junio C HamanoMay 13, 2016
  6. 4/4 pathspec: record labelsStefan Beller, May 13, 2016
  7. Junio C HamanoMay 13, 2016
  8. Stefan BellerMay 13, 2016
  9. Junio C HamanoMay 13, 2016
  10. Stefan BellerMay 13, 2016
  11. Junio C HamanoMay 13, 2016
  12. Duy NguyenMay 15, 2016
  13. Junio C HamanoMay 15, 2016
  14. Junio C HamanoMay 15, 2016
  15. Duy NguyenMay 16, 2016
  16. Stefan BellerMay 16, 2016
  17. Junio C HamanoMay 16, 2016
  18. Stefan BellerMay 16, 2016
  19. Junio C HamanoMay 16, 2016
  20. Stefan BellerMay 16, 2016
  21. Junio C HamanoMay 16, 2016
  22. Stefan BellerMay 16, 2016
  23. Junio C HamanoMay 16, 2016
  24. Stefan BellerMay 16, 2016
  25. Junio C HamanoMay 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.