diff: have the diff-* builtins configure diff before initializing revisions

This matches how the diff Porcelain works.  It makes the plumbing commands
respect diff's configuration options, such as indentHeuristic, because
init_revisions() calls diff_setup() which fills in the diff_options struct.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Marc Branchaud
2017-05-08 12:03:37 -04:00
committed by Junio C Hamano
parent cf5e77223a
commit 37590ce3c5
4 changed files with 69 additions and 3 deletions

View File

@ -20,9 +20,9 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
int result;
unsigned options = 0;
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
init_revisions(&rev, prefix);
gitmodules_config();
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
rev.abbrev = 0;
precompose_argv(argc, argv);