1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-06 01:03:02 +01:00

[PATCH] fetch.c: Remove some duplicated code in process()

It does not matter if we call prefetch() or set the TO_SCAN flag before
or after adding the object to process_queue.  However, doing it before
object_list_insert() allows us to kill 3 lines of duplicated code.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Sergey Vlasov 2005-09-21 20:34:14 +04:00 committed by Junio C Hamano
parent c5c0f452f5
commit 5de0bfffbc

11
fetch.c
View file

@ -138,18 +138,15 @@ static int process(struct object *obj)
/* We already have it, so we should scan it now. */
if (obj->flags & TO_SCAN)
return 0;
object_list_insert(obj, process_queue_end);
process_queue_end = &(*process_queue_end)->next;
obj->flags |= TO_SCAN;
return 0;
}
} else {
if (obj->flags & COMPLETE)
return 0;
prefetch(obj->sha1);
}
object_list_insert(obj, process_queue_end);
process_queue_end = &(*process_queue_end)->next;
prefetch(obj->sha1);
return 0;
}