summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:48:10 (GMT)
commitb78ea5fc3574a2ce262cfb37a7ea890caddd0cf5 (patch)
treefa241215b447ccd61db65f6a44356b7f93344854 /diff.h
parent92a1bf5a58920e5f1f51106f06cd9dc6d6eb6c43 (diff)
downloadgit-b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5.zip
git-b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5.tar.gz
git-b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5.tar.bz2
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>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 89544e6..0b67932 100644
--- a/diff.h
+++ b/diff.h
@@ -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);