diff options
author | Clément Poulain <clement.poulain@ensimag.imag.fr> | 2010-06-15 19:50:28 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-18 23:57:21 +0400 |
commit | e5fba602e59292c8c383a7a587897b5f7cbd5c78 (patch) | |
tree | 6b75f9b3f9b22a4b93fce96b3b24eada655d2788 /builtin/blame.c | |
parent | 573285e55265ccedab5507c47ebd4357f360093f (diff) |
textconv: support for cat_file
Make the textconv_object function public, and add --textconv option to cat-file
to perform conversion on blob objects. Using --textconv implies that we are
working on a blob.
As files drivers need to be initialized, a new config is required in addition
to git_default_config. Therefore git_cat_file_config() is introduced
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/blame.c')
-rw-r--r-- | builtin/blame.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 7bbe7612a1..2e63648ea0 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -91,10 +91,10 @@ struct origin { * if the textconv driver exists. * Return 1 if the conversion succeeds, 0 otherwise. */ -static int textconv_object(const char *path, - const unsigned char *sha1, - char **buf, - unsigned long *buf_size) +int textconv_object(const char *path, + const unsigned char *sha1, + char **buf, + unsigned long *buf_size) { struct diff_filespec *df; struct userdiff_driver *textconv; |