From 55c529a7005c653ceb318e1e25b40ff96a41877f Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Fri, 24 Jun 2016 23:09:19 +0000 Subject: hex: add oid_to_hex_r() This function works just like sha1_to_hex_r, except that it takes a pointer to struct object_id instead of a pointer to unsigned char. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- hex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hex.c') diff --git a/hex.c b/hex.c index 0519f853b2..9619b67af0 100644 --- a/hex.c +++ b/hex.c @@ -77,6 +77,11 @@ char *sha1_to_hex_r(char *buffer, const unsigned char *sha1) return buffer; } +char *oid_to_hex_r(char *buffer, const struct object_id *oid) +{ + return sha1_to_hex_r(buffer, oid->hash); +} + char *sha1_to_hex(const unsigned char *sha1) { static int bufno; -- cgit v1.2.3