path: root/builtin/diff-files.c
diff options
authorJens Lehmann <>2010-08-05 22:40:48 (GMT)
committerJunio C Hamano <>2010-08-09 16:11:44 (GMT)
commit302ad7a9930a34413418b6436f96826070367647 (patch)
tree5cd126308137179d75632405e3c084950d8c4e34 /builtin/diff-files.c
parentaee9c7d6540fe6f66fbbe7be420caa26ae0fa2d9 (diff)
Submodules: Use "ignore" settings from .gitmodules too for diff and status
The .gitmodules file is parsed for "submodule.<name>.ignore" entries before looking for them in .git/config. Thus settings found in .git/config will override those from .gitmodules, thereby allowing the local developer to ignore settings given by the remote side while also letting upstream set defaults for those users who don't have special needs. Signed-off-by: Jens Lehmann <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/diff-files.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index 5b64011..951c7c8 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -8,6 +8,7 @@
#include "commit.h"
#include "revision.h"
#include "builtin.h"
+#include "submodule.h"
static const char diff_files_usage[] =
"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
@@ -20,6 +21,7 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
unsigned options = 0;
init_revisions(&rev, prefix);
+ gitmodules_config();
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
rev.abbrev = 0;