diff options
Diffstat (limited to 'merge-ort.c')
-rw-r--r-- | merge-ort.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/merge-ort.c b/merge-ort.c index d1611ca400..a50b095c47 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -26,14 +26,22 @@ #include "diff.h" #include "diffcore.h" #include "dir.h" +#include "environment.h" +#include "gettext.h" +#include "hex.h" #include "entry.h" #include "ll-merge.h" +#include "match-trees.h" +#include "mem-pool.h" +#include "object-name.h" #include "object-store.h" +#include "oid-array.h" #include "promisor-remote.h" #include "revision.h" #include "strmap.h" #include "submodule-config.h" #include "submodule.h" +#include "trace2.h" #include "tree.h" #include "unpack-trees.h" #include "xdiff-interface.h" @@ -3505,7 +3513,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) { @@ -4216,7 +4224,7 @@ static void prefetch_for_content_merges(struct merge_options *opt, struct string_list_item *e; struct oid_array to_fetch = OID_ARRAY_INIT; - if (opt->repo != the_repository || !has_promisor_remote()) + if (opt->repo != the_repository || !repo_has_promisor_remote(the_repository)) return; for (e = &plist->items[plist->nr-1]; e >= plist->items; --e) { @@ -4715,14 +4723,14 @@ void merge_switch_to_result(struct merge_options *opt, void merge_finalize(struct merge_options *opt, struct merge_result *result) { - struct merge_options_internal *opti = result->priv; - if (opt->renormalize) git_attr_set_direction(GIT_ATTR_CHECKIN); assert(opt->priv == NULL); - clear_or_reinit_internal_opts(opti, 0); - FREE_AND_NULL(opti); + if (result->priv) { + clear_or_reinit_internal_opts(result->priv, 0); + FREE_AND_NULL(result->priv); + } } /*** Function Grouping: helper functions for merge_incore_*() ***/ @@ -5017,7 +5025,7 @@ static void merge_ort_internal(struct merge_options *opt, struct strbuf merge_base_abbrev = STRBUF_INIT; if (!merge_bases) { - merge_bases = get_merge_bases(h1, h2); + merge_bases = repo_get_merge_bases(the_repository, h1, h2); /* See merge-ort.h:merge_incore_recursive() declaration NOTE */ merge_bases = reverse_commit_list(merge_bases); } |