aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorAxel Bonnet <axel.bonnet@ensimag.imag.fr>2010-06-07 17:23:36 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-11 13:17:57 -0700
commita788d7d58bfbd2772b7ad5d788d8f7f885a651e1 (patch)
treec03b1a4cdccec1e0654d583a13976e9ca0616116 /diff.c
parent92a75a391e66cfc278cf59741e484efd80c02176 (diff)
downloadgit-a788d7d58bfbd2772b7ad5d788d8f7f885a651e1.tar.gz
git-a788d7d58bfbd2772b7ad5d788d8f7f885a651e1.tar.xz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/diff.c b/diff.c
index 494f5601e..b4a830f88 100644
--- a/diff.c
+++ b/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;