summaryrefslogtreecommitdiff
path: root/src/libgit2/fetchhead.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgit2/fetchhead.c')
-rw-r--r--src/libgit2/fetchhead.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libgit2/fetchhead.c b/src/libgit2/fetchhead.c
index 6511124ef..0ebfe5c43 100644
--- a/src/libgit2/fetchhead.c
+++ b/src/libgit2/fetchhead.c
@@ -105,7 +105,7 @@ static int fetchhead_ref_write(
git_filebuf *file,
git_fetchhead_ref *fetchhead_ref)
{
- char oid[GIT_OID_HEXSZ + 1];
+ char oid[GIT_OID_SHA1_HEXSIZE + 1];
const char *type, *name;
int head = 0;
@@ -113,7 +113,7 @@ static int fetchhead_ref_write(
GIT_ASSERT_ARG(fetchhead_ref);
git_oid_fmt(oid, &fetchhead_ref->oid);
- oid[GIT_OID_HEXSZ] = '\0';
+ oid[GIT_OID_SHA1_HEXSIZE] = '\0';
if (git__prefixcmp(fetchhead_ref->ref_name, GIT_REFS_HEADS_DIR) == 0) {
type = "branch ";
@@ -196,13 +196,13 @@ static int fetchhead_ref_parse(
*is_merge = 1;
}
- if (strlen(oid_str) != GIT_OID_HEXSZ) {
+ if (strlen(oid_str) != GIT_OID_SHA1_HEXSIZE) {
git_error_set(GIT_ERROR_FETCHHEAD,
"invalid object ID in FETCH_HEAD line %"PRIuZ, line_num);
return -1;
}
- if (git_oid_fromstr(oid, oid_str) < 0) {
+ if (git_oid__fromstr(oid, oid_str, GIT_OID_SHA1) < 0) {
const git_error *oid_err = git_error_last();
const char *err_msg = oid_err ? oid_err->message : "invalid object ID";