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

[PATCHv2 0/5] pathspec labels [WAS: submodule groups]

From
Stefan Beller <sbeller@google.com>
Date
May 13, 2016, 23:13 UTC
Message-ID
<20160513231326.8994-1-sbeller@google.com>
I am happy with the results of the label experiments. (Mainly writing the tests)
>> 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.
See the new tests what I mean. It cleared up for me as well when writing them.
> I am wondering where we should sanity check (and die, pointing out
> an error in .gitattributes file).  Is this function a good place to
> reject TRUE and FALSE?

TRUE and FALSE are solved issues in this series. However we still want funny characters not be used. What if we want to use them as special characters in the future? (e.g. 'label*' for 'labelA' or 'labelB' or label{A,B} for the same)

I think it is too late in the matching, so ideally we would check label names when they are assigned (i.e. while editing the .gitattributes file) That is not in our control, though.

And during use of match_pathspec it is already to late to die(...) for bad labels, because the labels may not be in control for the user (She just cloned the repository and wants to inspect certain files, which are labeled "$*&^".) So for now we just output a warning for these cases, in the hope that content creatos upstream respect the recommendation for labels.

Feedback welcome!

Thanks, Stefan

Stefan Beller (5):
  Documentation: fix a typo
  Documentation: correct typo in example for querying attributes
  pathspec: move long magic parsing out of prefix_pathspec
  pathspec: move prefix check out of the inner loop
  pathspec: record labels
 Documentation/gitattributes.txt               |  14 ++-
 Documentation/glossary-content.txt            |   4 +
 Documentation/technical/api-gitattributes.txt |   2 +-
 dir.c                                         |  50 ++++++++
 pathspec.c                                    | 110 +++++++++++------
 pathspec.h                                    |   1 +
 t/t6134-pathspec-with-labels.sh               | 164 ++++++++++++++++++++++++++
 7 files changed, 305 insertions(+), 40 deletions(-)
 create mode 100755 t/t6134-pathspec-with-labels.sh
-- 
2.8.2.401.gb7348ac.dirty
Next: Stefan Beller
Message 1 of 17 in “[PATCHv2 0/5] pathspec labels [WAS: submodule groups]”
  1. Stefan BellerMay 13, 2016
  2. 1/5 Documentation: fix a typoStefan Beller, May 13, 2016
  3. 2/5 Documentation: correct typo in example for querying attributesStefan Beller, May 13, 2016
  4. 3/5 pathspec: move long magic parsing out of prefix_pathspecStefan Beller, May 13, 2016
  5. 4/5 pathspec: move prefix check out of the inner loopStefan Beller, May 13, 2016
  6. 5/5 pathspec: record labelsStefan Beller, May 13, 2016
  7. Junio C HamanoMay 14, 2016
  8. Stefan BellerMay 16, 2016
  9. Junio C HamanoMay 16, 2016
  10. Stefan BellerMay 16, 2016
  11. Junio C HamanoMay 16, 2016
  12. Stefan BellerMay 16, 2016
  13. Junio C HamanoMay 16, 2016
  14. Stefan BellerMay 16, 2016
  15. Junio C HamanoMay 16, 2016
  16. Stefan BellerMay 16, 2016
  17. 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.