]> git.ipfire.org Git - thirdparty/git.git/blobdiff - merge.c
t/test_lib: avoid naked bash arrays in file_lineno
[thirdparty/git.git] / merge.c
diff --git a/merge.c b/merge.c
index 91008f760223e4f6c65a5d344bb6403dd5885d28..aa36de2f64a4e1195a274f5d50c471c6806d4db8 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -37,7 +37,7 @@ int try_merge_command(struct repository *r,
        argv_array_clear(&args);
 
        discard_index(r->index);
-       if (read_index(r->index) < 0)
+       if (repo_read_index(r) < 0)
                die(_("failed to read the cache"));
        resolve_undo_clear_index(r->index);
 
@@ -58,7 +58,7 @@ int checkout_fast_forward(struct repository *r,
 
        refresh_index(r->index, REFRESH_QUIET, NULL, NULL, NULL);
 
-       if (hold_locked_index(&lock_file, LOCK_REPORT_ON_ERROR) < 0)
+       if (repo_hold_locked_index(r, &lock_file, LOCK_REPORT_ON_ERROR) < 0)
                return -1;
 
        memset(&trees, 0, sizeof(trees));
@@ -94,6 +94,7 @@ int checkout_fast_forward(struct repository *r,
        opts.verbose_update = 1;
        opts.merge = 1;
        opts.fn = twoway_merge;
+       init_checkout_metadata(&opts.meta, NULL, remote, NULL);
        setup_unpack_trees_porcelain(&opts, "merge");
 
        if (unpack_trees(nr_trees, t, &opts)) {