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>
This commit is contained in:
committed by
Junio C Hamano
parent
dcf42869ee
commit
26d024ecf0
6
diff.c
6
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 ||
|
||||
|
||||
Reference in New Issue
Block a user