summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:51:18 (GMT)
commit26d024ecf0e2e5bd697714b95930bb6008d85f3f (patch)
tree82e38d7c9aee2bab48766086b40125a6f8d90ef8 /diff.c
parentdcf42869eefe22150a30ed0221e01b701cea1f14 (diff)
downloadgit-26d024ecf0e2e5bd697714b95930bb6008d85f3f.zip
git-26d024ecf0e2e5bd697714b95930bb6008d85f3f.tar.gz
git-26d024ecf0e2e5bd697714b95930bb6008d85f3f.tar.bz2
ws.c: remove implicit dependency on the_index
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.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 5256b9e..c5b5e7a 100644
--- a/diff.c
+++ b/diff.c
@@ -1705,7 +1705,7 @@ static void emit_rewrite_diff(const char *name_a,
memset(&ecbdata, 0, sizeof(ecbdata));
ecbdata.color_diff = want_color(o->use_color);
- ecbdata.ws_rule = whitespace_rule(name_b);
+ ecbdata.ws_rule = whitespace_rule(o->repo->index, name_b);
ecbdata.opt = o;
if (ecbdata.ws_rule & WS_BLANK_AT_EOF) {
mmfile_t mf1, mf2;
@@ -3480,7 +3480,7 @@ static void builtin_diff(const char *name_a,
lbl[0] = NULL;
ecbdata.label_path = lbl;
ecbdata.color_diff = want_color(o->use_color);
- ecbdata.ws_rule = whitespace_rule(name_b);
+ ecbdata.ws_rule = whitespace_rule(o->repo->index, name_b);
if (ecbdata.ws_rule & WS_BLANK_AT_EOF)
check_blank_at_eof(&mf1, &mf2, &ecbdata);
ecbdata.opt = o;
@@ -3640,7 +3640,7 @@ static void builtin_checkdiff(const char *name_a, const char *name_b,
data.filename = name_b ? name_b : name_a;
data.lineno = 0;
data.o = o;
- data.ws_rule = whitespace_rule(attr_path);
+ data.ws_rule = whitespace_rule(o->repo->index, attr_path);
data.conflict_marker_size = ll_merge_marker_size(o->repo->index, attr_path);
if (fill_mmfile(o->repo, &mf1, one) < 0 ||