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

Re: [PATCH] Ignore file filter

From
David Greaves <david@dgreaves.com>
Date
May 14, 2005, 15:13 UTC
Message-ID
<42861584.6020601@dgreaves.com>
In-Reply-To
<20050514142421.GG3905@pasky.ji.cz>
Petr Baudis wrote:
Show 28 quoted lines
>Dear diary, on Sat, May 14, 2005 at 11:01:49AM CEST, I got a letter
>where Junio C Hamano <junkio@cox.net> told me that...
>  
>
>>>>>>>"DG" == David Greaves <david@dgreaves.com> writes:
>>>>>>>              
>>>>>>>
>>>>>if [[ $file =~ $patt ]]; then
>>>>>          
>>>>>
>>>>I'm sorry but this is really nothing my bash-2.05.0(1)-release supports.
>>>>        
>>>>
>>DG> OK
>>DG> I don't know how to do that.
>>
>>Is that regexp or shell glob?  If regexp, expr is your friend,
>>like this:
>>
>>    if expr "$file" : "$patt" >/dev/null; then
>>    
>>
>
>Oh, this looks nice. I didn't know expr can do that. :-)
>
>Still, I'd prefer the old-fashioned globs as primary matching mechanism.
>  
>

OK I was wondering about supporting _both_ globs and re's right now my ignore file has a # to precede comment lines maybe re: precedes regexp lines and unadorned lines are globs.

However the re's provided by regex(7) are too weedy to be worth bothering with. If however, there is a serious plan to go to perl, it may be worth providing for this now in the ignore syntax.

Additionally this causes problems with sharing the same exclude file as used by git. However... I really think git's exclude file capability and cogito's are different. Cogito is aiming to provide full-blown SCM capabilities - git isn't

I am also concerned that a centralised ignore file is not flexible enough. Certainly limiting if we support globs only. It may be that you want different rules in different trees - someone on lkml mentioned that excludes vary in different parts of the source. Eg .s files may be generally ignored - but not in the asm parts of the tree.

Also... you haven't mentioned perl for a while - can you give us an update? I personally think we're making life needlessly unpleasant by sticking with shell.

David
Previous: Petr BaudisNext: Petr Baudis
Message 6 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.