summaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2005-09-21 16:34:04 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-23 04:52:11 (GMT)
commit754ac00e710386ab575843225768d4885c11c8c4 (patch)
tree1bc08639793c2ca6ff28653838a94cbff3beefa8 /fetch.c
parenta82d07e5e61a9aef38d70277a5b27588a939c5ce (diff)
downloadgit-754ac00e710386ab575843225768d4885c11c8c4.zip
git-754ac00e710386ab575843225768d4885c11c8c4.tar.gz
git-754ac00e710386ab575843225768d4885c11c8c4.tar.bz2
[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>
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fetch.c b/fetch.c
index bcdacaf..a1748e0 100644
--- a/fetch.c
+++ b/fetch.c
@@ -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;
@@ -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;
@@ -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;