diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-09-21 17:57:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-21 09:48:10 -0700 |
commit | e675765235001c382ba30d336bb69618296c012b (patch) | |
tree | d6a5cb53c2238c67f3569fa6512618d86ae48403 /read-cache.c | |
parent | grep.c: remove implicit dependency on the_index (diff) | |
download | tgif-e675765235001c382ba30d336bb69618296c012b.tar.xz |
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>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c index 86134e56a6..6f772b2885 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2137,7 +2137,7 @@ int index_has_changes(struct index_state *istate, if (tree || !get_oid_tree("HEAD", &cmp)) { struct diff_options opt; - diff_setup(&opt); + repo_diff_setup(the_repository, &opt); opt.flags.exit_with_status = 1; if (!sb) opt.flags.quick = 1; |