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

Re: [RFC] extending git-ls-files --exclude.

From
Junio C Hamano <junkio@cox.net>
Date
Jul 25, 2005, 07:32 UTC
Message-ID
<7vek9ns5ly.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050725064140.95259.qmail@web26304.mail.ukl.yahoo.com>
Marco Costalba <mcostalba@yahoo.it> writes:
Show 9 quoted lines
> Are really necessary to have both --exclude-from=<file> and 
> --exclude-per-directory=<name> ?
>
> Peraphs, if the file name of excluded list is the same for each directory, 
> e.g. .gitignore or something similar, instead of --exclude-per-directory
> we can use a concept of file validity 'scope' and just use --exclude-from=<file>.
> If entering in a directory <file> is found its contents are appended and 
> removed when leaving directory. A bad analogy can be with the use of 
> recursive Makefile.

Pasky wants to have one of the files in ~/.git-something if I understand correctly. I did not want to remove --exclude-from for that reason.

> If we use the 'scope' logic we can just prepend path when
> adding entries and serach with with FNM_PATHNAME flag.

And I wanted for people's script and existing ignore files to continue to work.

> Same comment as above, if prepending path when adding per 
> directory contents we can simplify to always use FNM_PATHNAME flag.

Yes, but that means you need to always prepend the current directory being looked at to get the original behaviour. The way it was originally done without FNM_PATHNAME was far easier to read, at least for me.

Previous: Marco CostalbaNext: Junio C Hamano
Message 2 of 3 in “Re: [RFC] extending git-ls-files --exclude.”
  1. Marco CostalbaJul 25, 2005
  2. Junio C HamanoJul 25, 2005
  3. Junio C HamanoJul 25, 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.