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

[PATCH 0/5] A bit more "attributes"

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 8, 2016, 22:58 UTC
Message-ID
<20160608225818.726-1-gitster@pobox.com>

The whole jc/attr topic is now depended on Stefan's "pathspec label" topic, both of which are in 'next' and cannot be rewound until the next cycle. These five patches are to continue my recent "attributes" work while the tree is in frozen state.

A few central data structures, namely "attr_stack" that keeps track of the attributes read from the .gitattributes files in the directory hierarchy of interest and "check_all_attr[]" that keeps track of the state of the attributes for the path being checked, are implemented as file-scope global singletons that belong to the attribute subsystem ("attr.c"). The envisioned endgame is to make them into per "struct git_attr_check" instance, so that the entire system can have multiple "directory hierarchy of interest" and "path being checked", i.e. allow multiple threads to keep their own "git_attr_check" and to use the attribute system simultaneously.

To further that plan, the first two patches pass the check[] structure further down the callchain, and the last two patches remove a hack that prevented check[] from being passed in one corner case and always pass it down the callchain.

Junio C Hamano (5):
  attr.c: add push_stack() helper
  attr.c: pass struct git_attr_check down the callchain
  fixup! d5ad6c13
  attr.c: correct ugly hack for git_all_attrs()
  attr.c: always pass check[] to collect_some_attrs()
 attr.c | 143 +++++++++++++++++++++++++++++++++--------------------------------
 attr.h |   2 +-
 2 files changed, 74 insertions(+), 71 deletions(-)
-- 
2.9.0-rc2-262-g9161bbf
Next: Junio C Hamano
Message 1 of 13 in “A bit more "attributes"”
  1. 0/5 A bit more "attributes"Junio C Hamano, Jun 8, 2016
  2. 1/5 attr.c: add push_stack() helperJunio C Hamano, Jun 8, 2016
  3. Stefan BellerJun 8, 2016
  4. Junio C HamanoJun 9, 2016
  5. 2/5 attr.c: pass struct git_attr_check down the callchainJunio C Hamano, Jun 8, 2016
  6. Stefan BellerJun 8, 2016
  7. 3/5 fixup! d5ad6c13Junio C Hamano, Jun 8, 2016
  8. Stefan BellerJun 9, 2016
  9. Junio C HamanoJun 9, 2016
  10. 4/5 attr.c: correct ugly hack for git_all_attrs()Junio C Hamano, Jun 8, 2016
  11. 5/5 attr.c: always pass check[] to collect_some_attrs()Junio C Hamano, Jun 8, 2016
  12. Stefan BellerJun 9, 2016
  13. Junio C HamanoJun 9, 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.