[PATCH] fetch.c: Remove redundant TO_FETCH flag
The TO_FETCH flag also became redundant after adding the SEEN flag - it was set and checked in process() to prevent adding the same object to process_queue multiple times, but now SEEN guards against this. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
754ac00e71
commit
51d8faf860
4
fetch.c
4
fetch.c
@ -55,7 +55,6 @@ static int process_tree(struct tree *tree)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define COMPLETE 1U
|
#define COMPLETE 1U
|
||||||
#define TO_FETCH 2U
|
|
||||||
#define TO_SCAN 4U
|
#define TO_SCAN 4U
|
||||||
#define SEEN 16U
|
#define SEEN 16U
|
||||||
|
|
||||||
@ -144,11 +143,10 @@ static int process(struct object *obj)
|
|||||||
obj->flags |= TO_SCAN;
|
obj->flags |= TO_SCAN;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (obj->flags & (COMPLETE | TO_FETCH))
|
if (obj->flags & COMPLETE)
|
||||||
return 0;
|
return 0;
|
||||||
object_list_insert(obj, process_queue_end);
|
object_list_insert(obj, process_queue_end);
|
||||||
process_queue_end = &(*process_queue_end)->next;
|
process_queue_end = &(*process_queue_end)->next;
|
||||||
obj->flags |= TO_FETCH;
|
|
||||||
|
|
||||||
prefetch(obj->sha1);
|
prefetch(obj->sha1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user