diff options
Diffstat (limited to 'src/libgit2/annotated_commit.c')
-rw-r--r-- | src/libgit2/annotated_commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libgit2/annotated_commit.c b/src/libgit2/annotated_commit.c index 7bd8b6077..c5c8ace78 100644 --- a/src/libgit2/annotated_commit.c +++ b/src/libgit2/annotated_commit.c @@ -39,8 +39,8 @@ static int annotated_commit_init( if ((error = git_commit_dup(&annotated_commit->commit, commit)) < 0) goto done; - git_oid_fmt(annotated_commit->id_str, git_commit_id(commit)); - annotated_commit->id_str[GIT_OID_SHA1_HEXSIZE] = '\0'; + git_oid_tostr(annotated_commit->id_str, GIT_OID_MAX_HEXSIZE + 1, + git_commit_id(commit)); if (!description) description = annotated_commit->id_str; |