diff.c: remove implicit dependency on the_index
A new variant repo_diff_setup() is added that takes 'struct repository *' and diff_setup() becomes a thin macro around it that is protected by NO_THE_REPOSITORY_COMPATIBILITY_MACROS, similar to NO_THE_INDEX_.... The plan is these macros will always be defined for all library files and the macros are only accessible in builtin/ Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
38bbc2ea39
commit
e675765235
@@ -34,7 +34,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
|
||||
|
||||
git_config(git_diff_ui_config, NULL);
|
||||
|
||||
diff_setup(&diffopt);
|
||||
repo_diff_setup(the_repository, &diffopt);
|
||||
diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
diffopt.flags.suppress_diff_headers = 1;
|
||||
diffopt.output_prefix = output_prefix_cb;
|
||||
|
||||
Reference in New Issue
Block a user