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

Re: [RFD] Ignore rules

From
David Greaves <david@dgreaves.com>
Date
May 16, 2005, 16:05 UTC
Message-ID
<4288C4AD.6060004@dgreaves.com>
In-Reply-To
<pan.2005.05.16.09.35.22.73817@smurf.noris.de>
Matthias Urlichs wrote:
Show 18 quoted lines
>Hi, Jon Seymour wrote:
>
>  
>
>>a. pushing the ignore logic into the core git tools such as git-ls-files
>>
>>b. including the current ignore .* rule as a default ignore rule that
>>can be overridden by a .gitignore file
>>    
>>
>
>I'd say YES to both.
>
>My preferred ignore file logic would be:
>
>- stop at first match (that's more efficient)
>  
>

more efficient true - but then surely 98% of the time you have to check _all_ patterns since files aren't generally ignored. And the ability to override earlier matches makes life much easier. So I say no shortcuts, last pattern to match decides ignore/accept status

Show 9 quoted lines
>- !pattern prevents exclusion of matching files
>- bash-style shell globs, except that ...
>  - a pattern that starts with / is a regexp
>  - * doesn't cross directory boundaries, but ** does
>  
>
>- I don't need a per-repository (i.e. non-checked-in/propagated)
>  ignore file.
>

I agree. But for the sake of checking a couple of files it makes sense to define a complete set of locations.

David
Previous: Matthias UrlichsNext: Petr Baudis
Message 15 of 18 in “Ignore file filter”
  1. Ignore file filterDavid Greaves, May 12, 2005
  2. Petr BaudisMay 13, 2005
  3. David GreavesMay 14, 2005
  4. Junio C HamanoMay 14, 2005
  5. Petr BaudisMay 14, 2005
  6. David GreavesMay 14, 2005
  7. [RFD] Ignore rulesPetr Baudis, May 14, 2005
  8. David GreavesMay 14, 2005
  9. Junio C HamanoMay 14, 2005
  10. Jon SeymourMay 15, 2005
  11. Junio C HamanoMay 15, 2005
  12. Junio C HamanoMay 15, 2005
  13. [RFD] git-run-with-user-pathJunio C Hamano, May 15, 2005
  14. Matthias UrlichsMay 16, 2005
  15. David GreavesMay 16, 2005
  16. Petr BaudisMay 14, 2005
  17. David GreavesMay 14, 2005
  18. David GreavesMay 13, 2005

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.