textconv: make the API public
The textconv functionality allows one to convert a file into text before running diff. But this functionality can be useful to other features such as blame. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
92a75a391e
commit
a788d7d58b
12
diff.c
12
diff.c
@ -43,10 +43,6 @@ static char diff_colors[][COLOR_MAXLEN] = {
|
||||
GIT_COLOR_NORMAL, /* FUNCINFO */
|
||||
};
|
||||
|
||||
static void diff_filespec_load_driver(struct diff_filespec *one);
|
||||
static size_t fill_textconv(struct userdiff_driver *driver,
|
||||
struct diff_filespec *df, char **outbuf);
|
||||
|
||||
static int parse_diff_color_slot(const char *var, int ofs)
|
||||
{
|
||||
if (!strcasecmp(var+ofs, "plain"))
|
||||
@ -1629,7 +1625,7 @@ void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const
|
||||
options->b_prefix = b;
|
||||
}
|
||||
|
||||
static struct userdiff_driver *get_textconv(struct diff_filespec *one)
|
||||
struct userdiff_driver *get_textconv(struct diff_filespec *one)
|
||||
{
|
||||
if (!DIFF_FILE_VALID(one))
|
||||
return NULL;
|
||||
@ -4002,9 +3998,9 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
|
||||
return strbuf_detach(&buf, outsize);
|
||||
}
|
||||
|
||||
static size_t fill_textconv(struct userdiff_driver *driver,
|
||||
struct diff_filespec *df,
|
||||
char **outbuf)
|
||||
size_t fill_textconv(struct userdiff_driver *driver,
|
||||
struct diff_filespec *df,
|
||||
char **outbuf)
|
||||
{
|
||||
size_t size;
|
||||
|
||||
|
Reference in New Issue
Block a user