diff options
Diffstat (limited to 'src/oid.c')
-rw-r--r-- | src/oid.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include "common.h" #include "git2/oid.h" #include "repository.h" +#include "global.h" #include <string.h> #include <limits.h> @@ -99,6 +100,13 @@ void git_oid_pathfmt(char *str, const git_oid *oid) str = fmt_one(str, oid->id[i]); } +char *git_oid_tostr_s(const git_oid *oid) +{ + char *str = GIT_GLOBAL->oid_fmt; + git_oid_nfmt(str, GIT_OID_HEXSZ + 1, oid); + return str; +} + char *git_oid_allocfmt(const git_oid *oid) { char *str = git__malloc(GIT_OID_HEXSZ + 1); |