aboutsummaryrefslogtreecommitdiff
path: root/diff-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-22 03:58:04 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-22 04:03:32 -0700
commit5c21ac0e7c475c82039ab604ee9d7d8430889346 (patch)
tree4dc25e01b3d8b9bf4eb46bab7c9632afd84c29fa /diff-index.c
parente09ad6e1e3308fde346b4b6287d9441363806832 (diff)
downloadgit-5c21ac0e7c475c82039ab604ee9d7d8430889346.tar.gz
git-5c21ac0e7c475c82039ab604ee9d7d8430889346.tar.xz
Libified diff-index: backward compatibility fix.
"diff-index -m" does not mean "do not ignore merges", but means "pretend missing files match the index". The previous round tried to address this, but failed because setup_revisions() ate "-m" flag before the caller had a chance to intervene. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff-index.c')
-rw-r--r--diff-index.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/diff-index.c b/diff-index.c
index 4a243b362..86940123b 100644
--- a/diff-index.c
+++ b/diff-index.c
@@ -23,9 +23,7 @@ int main(int argc, const char **argv)
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
- if (!strcmp(arg, "-m"))
- match_missing = 1;
- else if (!strcmp(arg, "--cached"))
+ if (!strcmp(arg, "--cached"))
cached = 1;
else
usage(diff_cache_usage);
@@ -37,5 +35,5 @@ int main(int argc, const char **argv)
if (!rev.pending_objects || rev.pending_objects->next ||
rev.max_count != -1 || rev.min_age != -1 || rev.max_age != -1)
usage(diff_cache_usage);
- return run_diff_index(&rev, cached, match_missing);
+ return run_diff_index(&rev, cached);
}