summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/http-push.c b/http-push.c
index aad89f2eab..1b030d96f4 100644
--- a/http-push.c
+++ b/http-push.c
@@ -309,7 +309,7 @@ static void start_fetch_packed(struct transfer_request *request)
struct transfer_request *check_request = request_queue_head;
struct http_pack_request *preq;
- target = find_sha1_pack(request->obj->oid.hash, repo->packs);
+ target = find_oid_pack(&request->obj->oid, 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;
@@ -681,7 +681,7 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
get_remote_object_list(obj->oid.hash[0]);
if (obj->flags & (REMOTE | PUSHING))
return 0;
- target = find_sha1_pack(obj->oid.hash, repo->packs);
+ target = find_oid_pack(&obj->oid, repo->packs);
if (target) {
obj->flags |= REMOTE;
return 0;
@@ -760,7 +760,7 @@ static void handle_lockprop_ctx(struct xml_ctx *ctx, int tag_closed)
static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
{
struct remote_lock *lock = (struct remote_lock *)ctx->userData;
- git_hash_ctx hash_ctx;
+ struct git_hash_ctx hash_ctx;
unsigned char lock_token_hash[GIT_MAX_RAWSZ];
if (tag_closed && ctx->cdata) {
@@ -774,8 +774,8 @@ static void handle_new_lock_ctx(struct xml_ctx *ctx, int tag_closed)
lock->token = xstrdup(ctx->cdata);
the_hash_algo->init_fn(&hash_ctx);
- the_hash_algo->update_fn(&hash_ctx, lock->token, strlen(lock->token));
- the_hash_algo->final_fn(lock_token_hash, &hash_ctx);
+ git_hash_update(&hash_ctx, lock->token, strlen(lock->token));
+ git_hash_final(lock_token_hash, &hash_ctx);
lock->tmpfile_suffix[0] = '_';
memcpy(lock->tmpfile_suffix + 1, hash_to_hex(lock_token_hash), the_hash_algo->hexsz);
@@ -1338,7 +1338,6 @@ static struct object_list **process_tree(struct tree *tree,
static int get_delta(struct rev_info *revs, struct remote_lock *lock)
{
- int i;
struct commit *commit;
struct object_list **p = &objects;
int count = 0;
@@ -1351,7 +1350,7 @@ static int get_delta(struct rev_info *revs, struct remote_lock *lock)
count += add_send_request(&commit->object, lock);
}
- for (i = 0; i < revs->pending.nr; i++) {
+ for (size_t i = 0; i < revs->pending.nr; i++) {
struct object_array_entry *entry = revs->pending.objects + i;
struct object *obj = entry->item;
const char *name = entry->name;