summaryrefslogtreecommitdiff
path: root/builtin-diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-03-03 22:51:46 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-03 22:51:46 -0800
commite551208dea5cd40721c437faafb6d604dedffef5 (patch)
treeb38f46b7de8e076c58a574c7d570a7ef74e520f2 /builtin-diff.c
parentMerge branch 'maint' (diff)
parentdiff: make more cases implicit --no-index (diff)
downloadtgif-e551208dea5cd40721c437faafb6d604dedffef5.tar.xz
Merge branch 'js/diff-ni' (early part)
* 'js/diff-ni' (early part): diff: make more cases implicit --no-index
Diffstat (limited to 'builtin-diff.c')
-rw-r--r--builtin-diff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-diff.c b/builtin-diff.c
index 28b660a780..4efbb8237b 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -215,7 +215,10 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
git_config(git_diff_ui_config);
init_revisions(&rev, prefix);
- argc = setup_revisions(argc, argv, &rev, NULL);
+ if (!setup_diff_no_index(&rev, argc, argv, nongit, prefix))
+ argc = 0;
+ else
+ argc = setup_revisions(argc, argv, &rev, NULL);
if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
if (diff_setup_done(&rev.diffopt) < 0)