Skip to content

Commit

Permalink
[PATCH] fetch.c: Remove redundant SCANNED flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
sigprof authored and Junio C Hamano committed Sep 23, 2005
1 parent a82d07e commit 754ac00
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ static int process_tree(struct tree *tree)
#define COMPLETE 1U
#define TO_FETCH 2U
#define TO_SCAN 4U
#define SCANNED 8U
#define SEEN 16U

static struct commit_list *complete = NULL;
Expand Down Expand Up @@ -106,10 +105,6 @@ static struct object_list **process_queue_end = &process_queue;

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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 754ac00

Please sign in to comment.