diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2016-06-24 23:09:19 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-28 11:39:02 -0700 |
commit | 55c529a7005c653ceb318e1e25b40ff96a41877f (patch) | |
tree | 852bc2ac950ce6c96bb92f5caa3ffafee740f0f6 /hex.c | |
parent | 05219a1276341e72d8082d76b7f5ed394b7437a4 (diff) | |
download | git-55c529a7005c653ceb318e1e25b40ff96a41877f.tar.gz |
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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hex.c')
-rw-r--r-- | hex.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |