Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Scharfe <rene.scharfe@lsrfire.ath.cx>2006-10-14 14:45:36 +0400
committerJunio C Hamano <junkio@cox.net>2006-10-14 22:49:52 +0400
commitabdc3fc84216a9334f40f3b7ce13e20a825697d0 (patch)
tree05a066dcb1ff662962794be159f23ca05714aa2a /cache.h
parentce91fc6eb9c4aefc73f845fc7104f332b2b308d2 (diff)
Add hash_sha1_file()
Most callers of write_sha1_file_prepare() are only interested in the resulting hash but don't care about the returned file name or the header. This patch adds a simple wrapper named hash_sha1_file() which does just that, and converts potential callers. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 97debd03c5..aa3a562759 100644
--- a/cache.h
+++ b/cache.h
@@ -245,6 +245,7 @@ char *enter_repo(char *path, int strict);
extern int sha1_object_info(const unsigned char *, char *, unsigned long *);
extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned long *size);
extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size);
+extern int hash_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *sha1);
extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
extern char *write_sha1_file_prepare(void *buf,
unsigned long len,