summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d00419)
raw | patch | inline | side by side (parent: 7d00419)
author | Daniel Barkalow <barkalow@iabervon.org> | |
Tue, 18 Mar 2008 02:15:02 +0000 (22:15 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Mar 2008 08:43:02 +0000 (01:43 -0700) |
Before the second fetch-pack connection in the same process, unmark
all of the objects marked in the first connection, in order that we'll
list them as things we have instead of thinking we've already
mentioned them.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
all of the objects marked in the first connection, in order that we'll
list them as things we have instead of thinking we've already
mentioned them.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch-pack.c | patch | blob | history |
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 7b280242244094774c909f67d6a8ed7902389c5a..65350ca52240bad95c1632ae604d66279d9a8997 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
#define SEEN (1U << 3)
#define POPPED (1U << 4)
+static int marked;
+
/*
* After sending this many "have"s if we do not get any new ACK , we
* give up traversing our history.
return 0;
}
+static int clear_marks(const char *path, const unsigned char *sha1, int flag, void *cb_data)
+{
+ struct object *o = deref_tag(parse_object(sha1), path, 0);
+
+ if (o && o->type == OBJ_COMMIT)
+ clear_commit_marks((struct commit *)o,
+ COMMON | COMMON_REF | SEEN | POPPED);
+ return 0;
+}
+
/*
This function marks a rev and its ancestors as common.
In some cases, it is desirable to mark only the ancestors (for example
unsigned in_vain = 0;
int got_continue = 0;
+ if (marked)
+ for_each_ref(clear_marks, NULL);
+ marked = 1;
+
for_each_ref(rev_list_insert_ref, NULL);
fetching = 0;