struct active_request_slot *slot;
struct http_object_request *obj_req;
- obj_req = new_http_object_request(repo->url, get_object_hash(*request->obj));
+ obj_req = new_http_object_request(repo->url, request->obj->oid.hash);
if (obj_req == NULL) {
request->state = ABORTED;
return;
struct transfer_request *check_request = request_queue_head;
struct http_pack_request *preq;
- target = find_sha1_pack(get_object_hash(*request->obj), repo->packs);
+ target = find_sha1_pack(request->obj->oid.hash, repo->packs);
if (!target) {
fprintf(stderr, "Unable to fetch %s, will not be able to update server info refs\n", oid_to_hex(&request->obj->oid));
repo->can_update_info_refs = 0;
ssize_t size;
git_zstream stream;
- unpacked = read_sha1_file(get_object_hash(*request->obj), &type, &len);
+ unpacked = read_sha1_file(request->obj->oid.hash, &type, &len);
hdrlen = xsnprintf(hdr, sizeof(hdr), "%s %lu", typename(type), len) + 1;
/* Set it up */
if (request->state == RUN_MKCOL) {
if (request->curl_result == CURLE_OK ||
request->http_code == 405) {
- remote_dir_exists[get_object_hash(*request->obj)[0]] = 1;
+ remote_dir_exists[request->obj->oid.hash[0]] = 1;
start_put(request);
} else {
fprintf(stderr, "MKCOL %s failed, aborting (%d/%ld)\n",
start_fetch_loose(request);
return 1;
} else if (pushing && request->state == NEED_PUSH) {
- if (remote_dir_exists[get_object_hash(*request->obj)[0]] == 1) {
+ if (remote_dir_exists[request->obj->oid.hash[0]] == 1) {
start_put(request);
} else {
start_mkcol(request);
* Don't fetch the object if it's known to exist locally
* or is already in the request queue
*/
- if (remote_dir_exists[get_object_hash(*obj)[0]] == -1)
- get_remote_object_list(get_object_hash(*obj)[0]);
+ if (remote_dir_exists[obj->oid.hash[0]] == -1)
+ get_remote_object_list(obj->oid.hash[0]);
if (obj->flags & (LOCAL | FETCHING))
return;
* Don't push the object if it's known to exist on the remote
* or is already in the request queue
*/
- if (remote_dir_exists[get_object_hash(*obj)[0]] == -1)
- get_remote_object_list(get_object_hash(*obj)[0]);
+ if (remote_dir_exists[obj->oid.hash[0]] == -1)
+ get_remote_object_list(obj->oid.hash[0]);
if (obj->flags & (REMOTE | PUSHING))
return 0;
- target = find_sha1_pack(get_object_hash(*obj), repo->packs);
+ target = find_sha1_pack(obj->oid.hash, repo->packs);
if (target) {
obj->flags |= REMOTE;
return 0;