From 718c7f790c39f9b772836de7421f3d5067b22b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Wed, 3 Sep 2014 15:53:21 +0200 Subject: [PATCH] merge: set the checkout strategy to SAFE_CREATE The expectation is set with Repository.checkout()'s default strategy and the documentation text that we will write the merged content of the files to the workdir. We however fail to override the default checkout strategy when calling git_merge() which results in a DRY_RUN strategy and no files being changed. Set the checkout strategy to SAFE_CREATE to match expectations and text. --- src/repository.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/repository.c b/src/repository.c index 2b99558..0a53ee0 100644 --- a/src/repository.c +++ b/src/repository.c @@ -609,6 +609,7 @@ Repository_merge(Repository *self, PyObject *py_oid) if (err < 0) return Error_set(err); + checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; err = git_merge(self->repo, (const git_merge_head **)&oid_merge_head, 1, &merge_opts, &checkout_opts);