diff options
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 113c1d6962..3d6b34b4f7 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -9,6 +9,7 @@ #include "lockfile.h" #include "cache-tree.h" #include "object-store.h" +#include "repository.h" #include "commit.h" #include "blob.h" #include "builtin.h" @@ -157,7 +158,7 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two, } if (!oidcmp(&two->object.oid, &shifted)) return two; - return lookup_tree(&shifted); + return lookup_tree(the_repository, &shifted); } static struct commit *make_virtual_commit(struct tree *tree, const char *comment) @@ -415,7 +416,7 @@ struct tree *write_tree_from_memory(struct merge_options *o) return NULL; } - result = lookup_tree(&active_cache_tree->oid); + result = lookup_tree(the_repository, &active_cache_tree->oid); return result; } @@ -1191,9 +1192,9 @@ static int merge_submodule(struct merge_options *o, return 0; } - if (!(commit_base = lookup_commit_reference(base)) || - !(commit_a = lookup_commit_reference(a)) || - !(commit_b = lookup_commit_reference(b))) { + if (!(commit_base = lookup_commit_reference(the_repository, base)) || + !(commit_a = lookup_commit_reference(the_repository, a)) || + !(commit_b = lookup_commit_reference(the_repository, b))) { output(o, 1, _("Failed to merge submodule %s (commits not present)"), path); return 0; } @@ -3426,7 +3427,7 @@ int merge_recursive(struct merge_options *o, /* if there is no common ancestor, use an empty tree */ struct tree *tree; - tree = lookup_tree(the_hash_algo->empty_tree); + tree = lookup_tree(the_repository, the_repository->hash_algo->empty_tree); merged_common_ancestors = make_virtual_commit(tree, "ancestor"); } @@ -3488,7 +3489,9 @@ static struct commit *get_ref(const struct object_id *oid, const char *name) { struct object *object; - object = deref_tag(parse_object(oid), name, strlen(name)); + object = deref_tag(the_repository, parse_object(the_repository, oid), + name, + strlen(name)); if (!object) return NULL; if (object->type == OBJ_TREE) |