summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-09-20 16:04:46 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-09-20 16:08:14 -0700
commite49521b56d8715f46b93ee6bc95f7de9c6858365 (patch)
tree3303de68046e01531ea03e0efa2006a754ce4f27 /cache.h
parentgitweb: Fix thinko in git_tags and git_heads (diff)
downloadtgif-e49521b56d8715f46b93ee6bc95f7de9c6858365.tar.xz
Make hexval() available to others.
builtin-mailinfo.c has its own hexval implementaiton but it can share the table-lookup one recently implemented in sha1_file.c Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 57db7c9b20..d557e75eb2 100644
--- a/cache.h
+++ b/cache.h
@@ -278,6 +278,12 @@ enum object_type {
OBJ_BAD,
};
+extern signed char hexval_table[256];
+static inline unsigned int hexval(unsigned int c)
+{
+ return hexval_table[c];
+}
+
/* Convert to/from hex/sha1 representation */
#define MINIMUM_ABBREV 4
#define DEFAULT_ABBREV 7