git: Use 3-way merge when applying patches
diff mbox

Message ID
State Accepted
Headers show

Commit Message

Andrew Donnellan Feb. 3, 2017, 4:16 a.m. UTC
From: Russell Currey <>

Switch to using 3-way merging as this helps with a lot of situations where
there are minor, but automatically-resolvable conflicts.


Signed-off-by: Russell Currey <>
Signed-off-by: Andrew Donnellan <>

Already merged, for information only

 src/ | 1 +
 1 file changed, 1 insertion(+)

diff mbox

diff --git a/src/ b/src/
index 9be867f..071f009 100644
--- a/src/
+++ b/src/
@@ -69,6 +69,7 @@  pub fn apply_patch(repo: &Repository, path: &Path)
     // We call out to "git am" since libgit2 doesn't implement "am"
     let output = Command::new("git")
         .arg("am") // apply from mbox
+        .arg("-3") // three way merge
         .arg(&path) // from our mbox file
         .current_dir(&workdir) // in the repo's working directory
         .output() // run synchronously