aboutsummaryrefslogtreecommitdiffstats
path: root/add-interactive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-09-01 11:26:28 -0700
committerJunio C Hamano <gitster@pobox.com>2023-09-01 11:26:28 -0700
commitf137bd4358bba70cede3e3198cbd50fd656b70a9 (patch)
tree6c25f371df114aa979177043cab44bbdf1e383cc /add-interactive.c
parent3525f1dbc18ae36ca9c671e807d6aac2ac432600 (diff)
parent5cc6b2d70bc55ab75913ee93d9ac96ad875fbb29 (diff)
downloadgit-f137bd4358bba70cede3e3198cbd50fd656b70a9.tar.gz
Merge branch 'jk/diff-result-code-cleanup'
"git diff --no-such-option" and other corner cases around the exit status of the "diff" command has been corrected. * jk/diff-result-code-cleanup: diff: drop useless "status" parameter from diff_result_code() diff: drop useless return values in git-diff helpers diff: drop useless return from run_diff_{files,index} functions diff: die when failing to read index in git-diff builtin diff: show usage for unknown builtin_diff_files() options diff-files: avoid negative exit value diff: spell DIFF_INDEX_CACHED out when calling run_diff_index()
Diffstat (limited to 'add-interactive.c')
-rw-r--r--add-interactive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/add-interactive.c b/add-interactive.c
index add9a1ad43..7fd00c5e25 100644
--- a/add-interactive.c
+++ b/add-interactive.c
@@ -569,7 +569,7 @@ static int get_modified_files(struct repository *r,
copy_pathspec(&rev.prune_data, ps);
if (s.mode == FROM_INDEX)
- run_diff_index(&rev, 1);
+ run_diff_index(&rev, DIFF_INDEX_CACHED);
else {
rev.diffopt.flags.ignore_dirty_submodules = 1;
run_diff_files(&rev, 0);