Skip to contentSkip to conversation

Document core.excludesfile for git-add

PATCH In review Michael Hendricks 4 participants 5 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Document core.excludesfile for git-add

During the discussion of core.excludesfile in the user-manual, I realized that the configuration wasn't mentioned in the man pages.

---
 Documentation/git-add.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Documentation/git-add.txt +9 -0
index 27b9c0f..a0c9f68 100644
@@ -69,6 +69,15 @@ OPTIONS
 	for command-line options).
 
 
+Configuration
+-------------
+
+The optional configuration variable 'core.excludesfile' indicates a path to a
+file containing patterns of file names to exclude from git-add, similar to
+$GIT_DIR/info/exclude.  Patterns in the exclude file are used in addition to
+those in info/exclude.  See link:repository-layout.html[repository layout].
+
+
 EXAMPLES
 --------
 git-add Documentation/\\*.txt::
Signature · 1 line
1.5.2.rc3.39.gaf9b-dirty
#1 lore raw

Thanks, but wouldn't this belong to Documentation/config.txt instead, I wonder?

#2 lore raw
Quoted 2 lines · Junio C Hamano

Thanks, but wouldn't this belong to Documentation/config.txt instead, I wonder?

It appears to my untrained eye that core.excludesfiles only works for git-add. It seems to have no effect on git-status and the only code that mentions core.excludesfile is builtin-add.c

Signature · 1 line
Michael
#3 lore raw
Quoted 7 lines · Michael Hendricks
Quoted 2 lines · Junio C Hamano

Thanks, but wouldn't this belong to Documentation/config.txt instead, I wonder?

It appears to my untrained eye that core.excludesfiles only works for git-add. It seems to have no effect on git-status and the only code that mentions core.excludesfile is builtin-add.c

I believe the current policy should be that all config options are at least briefly listed in config.txt and possibly are described in more detail in the documentation of relevant command.

Signature · 4 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett
#4 lore raw
In reply to Michael Hendricks
Quoted 7 lines · Michael Hendricks
Quoted 2 lines · Junio C Hamano

Thanks, but wouldn't this belong to Documentation/config.txt instead, I wonder?

It appears to my untrained eye that core.excludesfiles only works for git-add. It seems to have no effect on git-status and the only code that mentions core.excludesfile is builtin-add.c

If so, we should probably fix that. The set of ignore files parsed by relevant git commands should be consistent. We don't want a situation where exclude patterns in a file are picked up by some git commands, but not by others.

...Johan

Signature · 2 lines
Johan Herland, <[email protected]>
www.herland.net