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

[PATCH 0/3] fix "git add" pattern matching

From
Clemens Buchacher <drizzd@aon.at>
Date
Jan 14, 2009, 14:54 UTC
Message-ID
<1231944876-29930-1-git-send-email-drizzd@aon.at>
Hi,

Johannes Schneider reported that "git add '*'" did not add matching files. And indeed pattern matching for tracked files is broken since 1.6.1. I've never used this feature myself, but I can imagine it's useful in some situations. For example, you can do "git add '*.c'" to add all .c files. The equivalent command without pattern matching would be "find . -name '*.c' | xargs git add".

[PATCH 1/3] clean up pathspec matching [PATCH 2/3] remove pathspec_match, use match_pathspec instead [PATCH 3/3] implement pattern matching in ce_path_match

This patch series fixes pattern matching for "git add". The first two patches are cleanups only. PATCH 3/3 then implements pattern matching in ce_path_match. It is very intrusive in the sense that all commands using ce_path_match will now have pattern matching. I suppose this is good in general, but can also have undesired side-effects, as in "git log --follow '*'", for example. I'd appreciate some double-checking in that context.

Cheers, Clemens

Next: Clemens Buchacher
Message 1 of 16 in “fix "git add" pattern matching”
  1. 0/3 fix "git add" pattern matchingClemens Buchacher, Jan 14, 2009
  2. 1/3 clean up pathspec matchingClemens Buchacher, Jan 14, 2009
  3. 2/3 remove pathspec_match, use match_pathspec insteadClemens Buchacher, Jan 14, 2009
  4. 3/3 implement pattern matching in ce_path_matchClemens Buchacher, Jan 14, 2009
  5. Clemens BuchacherJan 14, 2009
  6. Johannes SchindelinJan 14, 2009
  7. Sverre RabbelierJan 14, 2009
  8. Samuel TardieuJan 14, 2009
  9. Jeff KingJan 14, 2009
  10. Junio C HamanoJan 14, 2009
  11. Clemens BuchacherJan 14, 2009
  12. Junio C HamanoJan 14, 2009
  13. Clemens BuchacherJan 15, 2009
  14. Junio C HamanoJan 16, 2009
  15. Johannes SchindelinJan 14, 2009
  16. Clemens BuchacherJan 14, 2009

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.