revision.c: reduce implicit dependency the_repository
[gitweb.git] / notes-merge.c
index 76ab19e702423aeb511bfc1e939a7998c61fab61..13dd9ba1582b68c2a8e6083fab4b4ee86f9026c6 100644 (file)
@@ -126,7 +126,7 @@ static struct notes_merge_pair *diff_tree_remote(struct notes_merge_options *o,
        trace_printf("\tdiff_tree_remote(base = %.7s, remote = %.7s)\n",
               oid_to_hex(base), oid_to_hex(remote));
 
-       diff_setup(&opt);
+       repo_diff_setup(the_repository, &opt);
        opt.flags.recursive = 1;
        opt.output_format = DIFF_FORMAT_NO_OUTPUT;
        diff_setup_done(&opt);
@@ -189,7 +189,7 @@ static void diff_tree_local(struct notes_merge_options *o,
        trace_printf("\tdiff_tree_local(len = %i, base = %.7s, local = %.7s)\n",
               len, oid_to_hex(base), oid_to_hex(local));
 
-       diff_setup(&opt);
+       repo_diff_setup(the_repository, &opt);
        opt.flags.recursive = 1;
        opt.output_format = DIFF_FORMAT_NO_OUTPUT;
        diff_setup_done(&opt);
@@ -348,7 +348,8 @@ static int ll_merge_in_worktree(struct notes_merge_options *o,
        read_mmblob(&remote, &p->remote);
 
        status = ll_merge(&result_buf, oid_to_hex(&p->obj), &base, NULL,
-                         &local, o->local_ref, &remote, o->remote_ref, NULL);
+                         &local, o->local_ref, &remote, o->remote_ref,
+                         &the_index, NULL);
 
        free(base.ptr);
        free(local.ptr);
@@ -709,7 +710,7 @@ int notes_merge_commit(struct notes_merge_options *o,
                /* write file as blob, and add to partial_tree */
                if (stat(path.buf, &st))
                        die_errno("Failed to stat '%s'", path.buf);
-               if (index_path(&blob_oid, path.buf, &st, HASH_WRITE_OBJECT))
+               if (index_path(&the_index, &blob_oid, path.buf, &st, HASH_WRITE_OBJECT))
                        die("Failed to write blob object from '%s'", path.buf);
                if (add_note(partial_tree, &obj_oid, &blob_oid, NULL))
                        die("Failed to add resolved note '%s' to notes tree",