diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2023-04-22 23:09:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-22 23:09:32 +0100 |
| commit | 8a62616f43fe5ea37d41296f40293ff97aa88cfa (patch) | |
| tree | edb5683195bb8989814ca610e6745745b361efb9 /src/libgit2/annotated_commit.c | |
| parent | abb0b313172d1b4477fe0c6e88102ce4bb8db90c (diff) | |
| parent | b899fda3d88dc92f50e73544fb7524a1c3c70354 (diff) | |
| download | libgit2-8a62616f43fe5ea37d41296f40293ff97aa88cfa.tar.gz | |
Merge pull request #6549 from libgit2/ethomson/sha256_experimental
sha256: less hardcoded SHA1 types and lengths
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; |
