Skip to content

Commit

Permalink
Merge branch 'js/maint-http-push' into maint
Browse files Browse the repository at this point in the history
* js/maint-http-push:
  http-push: avoid a needless goto
  http-push: do not get confused by submodules
  http-push: avoid invalid memory accesses
  • Loading branch information
Junio C Hamano committed Feb 27, 2008
2 parents 2ac8af1 + 7fea9c5 commit 28b01f4
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1634,12 +1634,19 @@ static struct object_list **process_tree(struct tree *tree,

init_tree_desc(&desc, tree->buffer, tree->size);

while (tree_entry(&desc, &entry)) {
if (S_ISDIR(entry.mode))
while (tree_entry(&desc, &entry))
switch (object_type(entry.mode)) {
case OBJ_TREE:
p = process_tree(lookup_tree(entry.sha1), p, &me, name);
else
break;
case OBJ_BLOB:
p = process_blob(lookup_blob(entry.sha1), p, &me, name);
}
break;
default:
/* Subproject commit - not in this repository */
break;
}

free(tree->buffer);
tree->buffer = NULL;
return p;
Expand Down Expand Up @@ -2398,15 +2405,17 @@ int main(int argc, char **argv)
fill_active_slots();
add_fill_function(NULL, fill_active_slot);
#endif
finish_all_active_slots();
do {
finish_all_active_slots();
#ifdef USE_CURL_MULTI
fill_active_slots();
#endif
} while (request_queue_head && !aborted);

/* Update the remote branch if all went well */
if (aborted || !update_remote(ref->new_sha1, ref_lock)) {
if (aborted || !update_remote(ref->new_sha1, ref_lock))
rc = 1;
goto unlock;
}

unlock:
if (!rc)
fprintf(stderr, " done\n");
unlock_remote(ref_lock);
Expand Down

0 comments on commit 28b01f4

Please sign in to comment.