aboutsummaryrefslogtreecommitdiff
path: root/delta-islands.c
diff options
context:
space:
mode:
Diffstat (limited to 'delta-islands.c')
-rw-r--r--delta-islands.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/delta-islands.c b/delta-islands.c
index 36c94799d6..f4d2468790 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -283,7 +283,7 @@ void resolve_tree_islands(struct repository *r,
root_marks = kh_value(island_marks, pos);
tree = lookup_tree(r, &ent->idx.oid);
- if (!tree || parse_tree(tree) < 0)
+ if (!tree || repo_parse_tree(r, tree) < 0)
die(_("bad tree object %s"), oid_to_hex(&ent->idx.oid));
init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size);
@@ -390,8 +390,7 @@ static void add_ref_to_island(kh_str_t *remote_islands, const char *island_name,
rl->hash += sha_core;
}
-static int find_island_for_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
- int flags UNUSED, void *cb)
+static int find_island_for_ref(const struct reference *ref, void *cb)
{
struct island_load_data *ild = cb;
@@ -406,7 +405,7 @@ static int find_island_for_ref(const char *refname, const char *referent UNUSED,
/* walk backwards to get last-one-wins ordering */
for (i = ild->nr - 1; i >= 0; i--) {
- if (!regexec(&ild->rx[i], refname,
+ if (!regexec(&ild->rx[i], ref->name,
ARRAY_SIZE(matches), matches, 0))
break;
}
@@ -428,10 +427,10 @@ static int find_island_for_ref(const char *refname, const char *referent UNUSED,
if (island_name.len)
strbuf_addch(&island_name, '-');
- strbuf_add(&island_name, refname + match->rm_so, match->rm_eo - match->rm_so);
+ strbuf_add(&island_name, ref->name + match->rm_so, match->rm_eo - match->rm_so);
}
- add_ref_to_island(ild->remote_islands, island_name.buf, oid);
+ add_ref_to_island(ild->remote_islands, island_name.buf, ref->oid);
strbuf_release(&island_name);
return 0;
}