diff.c: reduce implicit dependency on the_index

diff and textconv code has so widespread use that it's hard to simply
update their api and all call sites at once because it would result in
a big patch. For now reduce the_index references to two places:
diff_setup() and fill_textconv().

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:
Nguyễn Thái Ngọc Duy
2018-09-21 17:57:19 +02:00
committed by Junio C Hamano
parent 92a1bf5a58
commit b78ea5fc35
8 changed files with 161 additions and 112 deletions

3
diff.h
View File

@ -18,6 +18,7 @@ struct userdiff_driver;
struct oid_array;
struct commit;
struct combine_diff_path;
struct repository;
typedef int (*pathchange_fn_t)(struct diff_options *options,
struct combine_diff_path *path);
@ -220,6 +221,8 @@ struct diff_options {
/* XDF_WHITESPACE_FLAGS regarding block detection are set at 2, 3, 4 */
#define COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE (1<<5)
int color_moved_ws_handling;
struct repository *repo;
};
void diff_emit_submodule_del(struct diff_options *o, const char *line);