aboutsummaryrefslogtreecommitdiff
path: root/negotiator/skipping.c
diff options
context:
space:
mode:
Diffstat (limited to 'negotiator/skipping.c')
-rw-r--r--negotiator/skipping.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/negotiator/skipping.c b/negotiator/skipping.c
index 616df6bf3a..fe4126ca4d 100644
--- a/negotiator/skipping.c
+++ b/negotiator/skipping.c
@@ -75,11 +75,10 @@ static struct entry *rev_list_push(struct data *data, struct commit *commit, int
return entry;
}
-static int clear_marks(const char *refname, const char *referent UNUSED, const struct object_id *oid,
- int flag UNUSED,
- void *cb_data UNUSED)
+static int clear_marks(const struct reference *ref, void *cb_data UNUSED)
{
- struct object *o = deref_tag(the_repository, parse_object(the_repository, oid), refname, 0);
+ struct object *o = deref_tag(the_repository, parse_object(the_repository, ref->oid),
+ ref->name, 0);
if (o && o->type == OBJ_COMMIT)
clear_commit_marks((struct commit *)o,
@@ -92,15 +91,15 @@ static int clear_marks(const char *refname, const char *referent UNUSED, const s
*/
static void mark_common(struct data *data, struct commit *seen_commit)
{
- struct prio_queue queue = { NULL };
+ struct commit_stack stack = COMMIT_STACK_INIT;
struct commit *c;
if (seen_commit->object.flags & COMMON)
return;
- prio_queue_put(&queue, seen_commit);
+ commit_stack_push(&stack, seen_commit);
seen_commit->object.flags |= COMMON;
- while ((c = prio_queue_get(&queue))) {
+ while ((c = commit_stack_pop(&stack))) {
struct commit_list *p;
if (!(c->object.flags & POPPED))
@@ -114,11 +113,11 @@ static void mark_common(struct data *data, struct commit *seen_commit)
continue;
p->item->object.flags |= COMMON;
- prio_queue_put(&queue, p->item);
+ commit_stack_push(&stack, p->item);
}
}
- clear_prio_queue(&queue);
+ commit_stack_clear(&stack);
}
/*