diff options
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 4ddd3adea0..8e87b6386d 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -10,7 +10,6 @@ #include "alloc.h" #include "attr.h" #include "blob.h" -#include "builtin.h" #include "cache-tree.h" #include "commit.h" #include "commit-reach.h" @@ -18,17 +17,25 @@ #include "diff.h" #include "diffcore.h" #include "dir.h" +#include "environment.h" +#include "gettext.h" +#include "hex.h" #include "ll-merge.h" #include "lockfile.h" +#include "match-trees.h" +#include "object-file.h" +#include "object-name.h" #include "object-store.h" #include "repository.h" #include "revision.h" #include "string-list.h" #include "submodule-config.h" #include "submodule.h" +#include "symlinks.h" #include "tag.h" #include "tree-walk.h" #include "unpack-trees.h" +#include "wrapper.h" #include "xdiff-interface.h" struct merge_options_internal { @@ -412,7 +419,7 @@ static int unpack_trees_start(struct merge_options *opt, { int rc; struct tree_desc t[3]; - struct index_state tmp_index = { NULL }; + struct index_state tmp_index = INDEX_STATE_INIT(opt->repo); memset(&opt->priv->unpack_opts, 0, sizeof(opt->priv->unpack_opts)); if (opt->priv->call_depth) @@ -951,7 +958,8 @@ static int update_file_flags(struct merge_options *opt, goto update_index; } - buf = read_object_file(&contents->oid, &type, &size); + buf = repo_read_object_file(the_repository, &contents->oid, + &type, &size); if (!buf) { ret = err(opt, _("cannot read object %s '%s'"), oid_to_hex(&contents->oid), path); @@ -2100,7 +2108,7 @@ static char *handle_path_level_conflicts(struct merge_options *opt, if (!new_path) { /* This should only happen when entry->non_unique_new_dir set */ if (!entry->non_unique_new_dir) - BUG("entry->non_unqiue_dir not set and !new_path"); + BUG("entry->non_unique_new_dir not set and !new_path"); output(opt, 1, _("CONFLICT (directory rename split): " "Unclear where to place %s because directory " "%s was renamed to multiple other directories, " @@ -3021,7 +3029,7 @@ static int read_oid_strbuf(struct merge_options *opt, void *buf; enum object_type type; unsigned long size; - buf = read_object_file(oid, &type, &size); + buf = repo_read_object_file(the_repository, oid, &type, &size); if (!buf) return err(opt, _("cannot read object %s"), oid_to_hex(oid)); if (type != OBJ_BLOB) { @@ -3592,7 +3600,7 @@ static int merge_recursive_internal(struct merge_options *opt, } if (!merge_bases) { - merge_bases = get_merge_bases(h1, h2); + merge_bases = repo_get_merge_bases(the_repository, h1, h2); merge_bases = reverse_commit_list(merge_bases); } @@ -3797,7 +3805,7 @@ static struct commit *get_ref(struct repository *repo, return make_virtual_commit(repo, (struct tree*)object, name); if (object->type != OBJ_COMMIT) return NULL; - if (parse_commit((struct commit *)object)) + if (repo_parse_commit(repo, (struct commit *)object)) return NULL; return (struct commit *)object; } |