diff.c: remove the_index dependency in textconv() functions

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:22 +02:00
committed by Junio C Hamano
parent a470beea39
commit 6afaf80785
8 changed files with 45 additions and 30 deletions

9
diff.h
View File

@ -442,7 +442,8 @@ int index_differs_from(const char *def, const struct diff_flags *flags,
* struct. If it is non-NULL, then "outbuf" points to a newly allocated buffer
* that should be freed by the caller.
*/
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);
@ -458,7 +459,11 @@ struct userdiff_driver *get_textconv(struct diff_filespec *one);
* if the textconv driver exists.
* Return 1 if the conversion succeeds, 0 otherwise.
*/
int textconv_object(const char *path, unsigned mode, const struct object_id *oid, int oid_valid, char **buf, unsigned long *buf_size);
int textconv_object(struct repository *repo,
const char *path,
unsigned mode,
const struct object_id *oid, int oid_valid,
char **buf, unsigned long *buf_size);
int parse_rename_score(const char **cp_p);