about summary refs log tree commit diff
path: root/third_party/git/builtin/diff-files.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/builtin/diff-files.c')
-rw-r--r--third_party/git/builtin/diff-files.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/git/builtin/diff-files.c b/third_party/git/builtin/diff-files.c
index 86ae474fbfb4..1e352dd8f77c 100644
--- a/third_party/git/builtin/diff-files.c
+++ b/third_party/git/builtin/diff-files.c
@@ -28,6 +28,13 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
 	git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
 	repo_init_revisions(the_repository, &rev, prefix);
 	rev.abbrev = 0;
+
+	/*
+	 * Consider "intent-to-add" files as new by default, unless
+	 * explicitly specified in the command line or anywhere else.
+	 */
+	rev.diffopt.ita_invisible_in_index = 1;
+
 	precompose_argv(argc, argv);
 
 	argc = setup_revisions(argc, argv, &rev, NULL);