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

[PATCH] Clarified documentation of --exclude-per-directory.

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 25, 2006, 15:58 UTC
Message-ID
<20060925155821.GC26844@spearce.org>
Tommi Virtanen noted on #git today that
  git ls-files --exclude-per-directory

doesn't appear to work as advertised by the documentation unless --others is also used. According to the current source code this is the case as the --exclude-per-directory file isn't read unless we are iterating over the working directory, which only happens with --others.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 Documentation/git-ls-files.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 8520b97..2a0b9f8 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -75,7 +75,8 @@ OPTIONS
 
 --exclude-per-directory=<file>::
 	read additional exclude patterns that apply only to the
-	directory and its subdirectories in <file>.
+	directory and its subdirectories in <file>.  This option
+	only takes effect if -o or --others is also used.
 
 --error-unmatch::
 	If any <file> does not appear in the index, treat this as an
@@ -167,7 +168,7 @@ time.  They are built and ordered in the
  * lines read from --exclude-from=<file>; patterns are ordered
    in the same order as they appear in the file.
 
- * When --exclude-per-directory=<name> is specified, upon
+ * When --exclude-per-directory=<name> and --others is specified, upon
    entering a directory that has such a file, its contents are
    appended at the end of the current "list of patterns".  They
    are popped off when leaving the directory.
-- 
1.4.2.1.g7a39b
Next: Junio C Hamano
Message 1 of 3 in “Clarified documentation of --exclude-per-directory.”
  1. Clarified documentation of --exclude-per-directory.Shawn Pearce, Sep 25, 2006
  2. Junio C HamanoSep 26, 2006
  3. Shawn PearceSep 26, 2006

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.