]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fetch.c
Convert check_connected to use struct object_id
[thirdparty/git.git] / builtin / fetch.c
index 225c734924f14854784cbc1e310f2fb817f1f38b..e705237fa900dd7e4e73a58e7b6dad425bc7e431 100644 (file)
@@ -457,8 +457,8 @@ static int s_update_ref(const char *action,
        transaction = ref_transaction_begin(&err);
        if (!transaction ||
            ref_transaction_update(transaction, ref->name,
-                                  ref->new_oid.hash,
-                                  check_old ? ref->old_oid.hash : NULL,
+                                  &ref->new_oid,
+                                  check_old ? &ref->old_oid : NULL,
                                   0, msg, &err))
                goto fail;
 
@@ -727,7 +727,7 @@ static int update_local_ref(struct ref *ref,
        }
 }
 
-static int iterate_ref_map(void *cb_data, unsigned char sha1[20])
+static int iterate_ref_map(void *cb_data, struct object_id *oid)
 {
        struct ref **rm = cb_data;
        struct ref *ref = *rm;
@@ -737,7 +737,7 @@ static int iterate_ref_map(void *cb_data, unsigned char sha1[20])
        if (!ref)
                return -1; /* end of the list */
        *rm = ref->next;
-       hashcpy(sha1, ref->old_oid.hash);
+       oidcpy(oid, &ref->old_oid);
        return 0;
 }