From 0bef57ee44a2f924ad0066b751a3c87888633f56 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Tue, 15 Aug 2006 13:37:19 -0700 Subject: make inline is_null_sha1 global Replace sha1 comparisons to null_sha1 with a global inline (which previously an unused static inline in builtin-apply.c) [jc: with a fix from Jonas Fonseca.] Signed-off-by: David Rientjes Signed-off-by: Junio C Hamano --- cache.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index af7740258d..c7382996f6 100644 --- a/cache.h +++ b/cache.h @@ -210,6 +210,10 @@ extern char *sha1_pack_name(const unsigned char *sha1); extern char *sha1_pack_index_name(const unsigned char *sha1); extern const char *find_unique_abbrev(const unsigned char *sha1, int); extern const unsigned char null_sha1[20]; +static inline int is_null_sha1(const unsigned char *sha1) +{ + return !memcmp(sha1, null_sha1, 20); +} int git_mkstemp(char *path, size_t n, const char *template); -- cgit v1.2.3