Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/diff.c b/diff.c
index e5d6d30a676..0848ac65dfc 100644
--- a/diff.c
+++ b/diff.c
@@ -1700,8 +1700,8 @@ static void emit_rewrite_diff(const char *name_a,
quote_two_c_style(&a_name, a_prefix, name_a, 0);
quote_two_c_style(&b_name, b_prefix, name_b, 0);
- size_one = fill_textconv(textconv_one, one, &data_one);
- size_two = fill_textconv(textconv_two, two, &data_two);
+ size_one = fill_textconv(o->repo, textconv_one, one, &data_one);
+ size_two = fill_textconv(o->repo, textconv_two, two, &data_two);
memset(&ecbdata, 0, sizeof(ecbdata));
ecbdata.color_diff = want_color(o->use_color);
@@ -3462,8 +3462,8 @@ static void builtin_diff(const char *name_a,
strbuf_reset(&header);
}
- mf1.size = fill_textconv(textconv_one, one, &mf1.ptr);
- mf2.size = fill_textconv(textconv_two, two, &mf2.ptr);
+ mf1.size = fill_textconv(o->repo, textconv_one, one, &mf1.ptr);
+ mf2.size = fill_textconv(o->repo, textconv_two, two, &mf2.ptr);
pe = diff_funcname_pattern(one);
if (!pe)
@@ -6337,11 +6337,11 @@ static char *run_textconv(struct repository *r,
return strbuf_detach(&buf, outsize);
}
-size_t fill_textconv(struct userdiff_driver *driver,
+size_t fill_textconv(struct repository *r,
+ struct userdiff_driver *driver,
struct diff_filespec *df,
char **outbuf)
{
- struct repository *r = the_repository;
size_t size;
if (!driver) {
@@ -6386,7 +6386,8 @@ size_t fill_textconv(struct userdiff_driver *driver,
return size;
}
-int textconv_object(const char *path,
+int textconv_object(struct repository *r,
+ const char *path,
unsigned mode,
const struct object_id *oid,
int oid_valid,
@@ -6404,7 +6405,7 @@ int textconv_object(const char *path,
return 0;
}
- *buf_size = fill_textconv(textconv, df, buf);
+ *buf_size = fill_textconv(r, textconv, df, buf);
free_filespec(df);
return 1;
}