From: Sergey Vlasov Date: Wed, 21 Sep 2005 16:18:59 GMT Subject: [PATCH 3/8] fetch.c: Remove redundant SCANNED flag Message-ID: <20050921161859.A29A0E2FFC7@center4.mivlgu.local> In-Reply-To: <20050921161829.GA20944@master.mivlgu.local> After adding the SEEN flag, the SCANNED flag became obviously redundant - each object can get into process_queue through process() only once, and therefore multiple calls to process_object() for the same object are not possible. --- fetch.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) 320120295a258c4b66c43ee3b4ff6af962333950 diff --git a/fetch.c b/fetch.c --- a/fetch.c +++ b/fetch.c @@ -57,7 +57,6 @@ static int process_tree(struct tree *tre #define COMPLETE 1U #define TO_FETCH 2U #define TO_SCAN 4U -#define SCANNED 8U #define SEEN 16U static struct commit_list *complete = NULL; @@ -106,10 +105,6 @@ static struct object_list **process_queu static int process_object(struct object *obj) { - if (obj->flags & SCANNED) - return 0; - obj->flags |= SCANNED; - if (obj->type == commit_type) { if (process_commit((struct commit *)obj)) return -1; @@ -142,7 +137,7 @@ static int process(struct object *obj) if (has_sha1_file(obj->sha1)) { parse_object(obj->sha1); /* We already have it, so we should scan it now. */ - if (obj->flags & (SCANNED | TO_SCAN)) + if (obj->flags & TO_SCAN) return 0; object_list_insert(obj, process_queue_end); process_queue_end = &(*process_queue_end)->next;