From: René Scharfe Date: Mon, 3 Sep 2007 18:08:01 +0000 (+0200) Subject: Remove unused function convert_sha1_file() X-Git-Tag: v1.5.4-rc0~451^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=89b4256cfbb8d878cc4cd1104ac4865ba1f2a58e;p=git.git Remove unused function convert_sha1_file() convert_sha1_file() became unused by the previous patch -- remove it. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- diff --git a/cache.h b/cache.h index 70abbd59b..493983cba 100644 --- a/cache.h +++ b/cache.h @@ -592,7 +592,6 @@ extern void trace_argv_printf(const char **argv, int count, const char *format, /* convert.c */ extern char *convert_to_git(const char *path, const char *src, unsigned long *sizep); extern char *convert_to_working_tree(const char *path, const char *src, unsigned long *sizep); -extern void *convert_sha1_file(const char *path, const unsigned char *sha1, unsigned int mode, enum object_type *type, unsigned long *size); /* diff.c */ extern int diff_auto_refresh_index; diff --git a/convert.c b/convert.c index 21908b103..d77c8eb8b 100644 --- a/convert.c +++ b/convert.c @@ -687,18 +687,3 @@ char *convert_to_working_tree(const char *path, const char *src, unsigned long * return buf; } - -void *convert_sha1_file(const char *path, const unsigned char *sha1, - unsigned int mode, enum object_type *type, - unsigned long *size) -{ - void *buffer = read_sha1_file(sha1, type, size); - if (S_ISREG(mode) && buffer) { - void *converted = convert_to_working_tree(path, buffer, size); - if (converted) { - free(buffer); - buffer = converted; - } - } - return buffer; -}