X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=http-push.c;h=40524a8593a96e83fa4e32c429034490112d1033;hb=b3ca4e4ebba6915ea534c4b82cfc5d6f10b4c283;hp=72ad89ce11217b56f4fe4a722249dfaf9ca86ac3;hpb=097dc3d8c32f4b85bf9701d5e1de98999ac25c1c;p=git.git diff --git a/http-push.c b/http-push.c index 72ad89ce..40524a85 100644 --- a/http-push.c +++ b/http-push.c @@ -788,6 +788,7 @@ static void finish_request(struct transfer_request *request) } } +#ifdef USE_CURL_MULTI void fill_active_slots(void) { struct transfer_request *request = request_queue_head; @@ -821,6 +822,7 @@ void fill_active_slots(void) slot = slot->next; } } +#endif static void get_remote_object_list(unsigned char parent); @@ -851,8 +853,10 @@ static void add_fetch_request(struct object *obj) request->next = request_queue_head; request_queue_head = request; +#ifdef USE_CURL_MULTI fill_active_slots(); step_active_slots(); +#endif } static int add_send_request(struct object *obj, struct remote_lock *lock) @@ -889,8 +893,10 @@ static int add_send_request(struct object *obj, struct remote_lock *lock) request->next = request_queue_head; request_queue_head = request; +#ifdef USE_CURL_MULTI fill_active_slots(); step_active_slots(); +#endif return 1; } @@ -1715,6 +1721,7 @@ static struct object_list **process_tree(struct tree *tree, { struct object *obj = &tree->object; struct tree_desc desc; + struct name_entry entry; struct name_path me; obj->flags |= LOCAL; @@ -1734,18 +1741,11 @@ static struct object_list **process_tree(struct tree *tree, desc.buf = tree->buffer; desc.size = tree->size; - while (desc.size) { - unsigned mode; - const char *name; - const unsigned char *sha1; - - sha1 = tree_entry_extract(&desc, &name, &mode); - update_tree_entry(&desc); - - if (S_ISDIR(mode)) - p = process_tree(lookup_tree(sha1), p, &me, name); + while (tree_entry(&desc, &entry)) { + if (S_ISDIR(entry.mode)) + p = process_tree(lookup_tree(entry.sha1), p, &me, name); else - p = process_blob(lookup_blob(sha1), p, &me, name); + p = process_blob(lookup_blob(entry.sha1), p, &me, name); } free(tree->buffer); tree->buffer = NULL; @@ -2529,7 +2529,9 @@ int main(int argc, char **argv) if (objects_to_send) fprintf(stderr, " sending %d objects\n", objects_to_send); +#ifdef USE_CURL_MULTI fill_active_slots(); +#endif finish_all_active_slots(); /* Update the remote branch if all went well */