summaryrefslogtreecommitdiff
path: root/builtin-diff-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-diff-index.c')
-rw-r--r--builtin-diff-index.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index c42ef9a7a7..b37c9e8ccb 100644
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
@@ -28,6 +28,9 @@ int cmd_diff_index(int argc, const char **argv, char **envp)
else
usage(diff_cache_usage);
}
+ if (!rev.diffopt.output_format)
+ rev.diffopt.output_format = DIFF_FORMAT_RAW;
+
/*
* Make sure there is one revision (i.e. pending object),
* and there is no revision filtering parameters.