[PATCH] fetch.c: Remove redundant SCANNED flag
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. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
Sergey Vlasov committed
Sep 21, 2005 at 20:34 UTC
125beb1e27c2f496a04b90b6079753c2baf49c31
1 file changed
+1
-6
fetch.c
+1
-6
@@ -57,7 +57,6 @@ static int process_tree(struct tree *tree)
57
#define COMPLETE 1U
58
#define TO_FETCH 2U
59
#define TO_SCAN 4U
60
-#define SCANNED 8U
60
#define SEEN 16U
61
62
static struct commit_list *complete = NULL;
@@ -106,10 +105,6 @@ static struct object_list **process_queue_end = &process_queue;
105
106
static int process_object(struct object *obj)
107
{
109
- if (obj->flags & SCANNED)
110
- return 0;
111
- obj->flags |= SCANNED;
112
-
108
if (obj->type == commit_type) {
109
if (process_commit((struct commit *)obj))
110
return -1;
@@ -142,7 +137,7 @@ static int process(struct object *obj)
137
if (has_sha1_file(obj->sha1)) {
138
parse_object(obj->sha1);
139
/* We already have it, so we should scan it now. */
145
- if (obj->flags & (SCANNED | TO_SCAN))
140
+ if (obj->flags & TO_SCAN)
141
return 0;
142
object_list_insert(obj, process_queue_end);
143
process_queue_end = &(*process_queue_end)->next;