From 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 May 2020 00:06:52 +0100 Subject: revert(3p/git): Revert merge of git upstream at v2.26.2 This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3. --- third_party/git/walker.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'third_party/git/walker.c') diff --git a/third_party/git/walker.c b/third_party/git/walker.c index 4984bf8b3d..06cd2bd569 100644 --- a/third_party/git/walker.c +++ b/third_party/git/walker.c @@ -8,7 +8,6 @@ #include "tag.h" #include "blob.h" #include "refs.h" -#include "progress.h" static struct object_id current_commit_oid; @@ -163,11 +162,6 @@ static int process(struct walker *walker, struct object *obj) static int loop(struct walker *walker) { struct object_list *elem; - struct progress *progress = NULL; - uint64_t nr = 0; - - if (walker->get_progress) - progress = start_delayed_progress(_("Fetching objects"), 0); while (process_queue) { struct object *obj = process_queue->item; @@ -182,20 +176,15 @@ static int loop(struct walker *walker) */ if (! (obj->flags & TO_SCAN)) { if (walker->fetch(walker, obj->oid.hash)) { - stop_progress(&progress); report_missing(obj); return -1; } } if (!obj->type) parse_object(the_repository, &obj->oid); - if (process_object(walker, obj)) { - stop_progress(&progress); + if (process_object(walker, obj)) return -1; - } - display_progress(progress, ++nr); } - stop_progress(&progress); return 0; } @@ -272,14 +261,12 @@ int walker_fetch(struct walker *walker, int targets, char **target, struct strbuf refname = STRBUF_INIT; struct strbuf err = STRBUF_INIT; struct ref_transaction *transaction = NULL; - struct object_id *oids; + struct object_id *oids = xmalloc(targets * sizeof(struct object_id)); char *msg = NULL; int i, ret = -1; save_commit_buffer = 0; - ALLOC_ARRAY(oids, targets); - if (write_ref) { transaction = ref_transaction_begin(&err); if (!transaction) { -- cgit 1.4.1