From e675765235001c382ba30d336bb69618296c012b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 21 Sep 2018 17:57:24 +0200 Subject: diff.c: remove implicit dependency on the_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/range-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/range-diff.c') diff --git a/builtin/range-diff.c b/builtin/range-diff.c index 0aa9bed41f..1c477c4dc5 100644 --- a/builtin/range-diff.c +++ b/builtin/range-diff.c @@ -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; -- cgit v1.2.3