From 75f3537893dd2aa92822e757b575b2a4d9dfccdb Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 25 Jun 2023 06:03:07 -0700 Subject: [PATCH] merge_tools: assume that conflict is 3-way We check that the conflict to run the merge tool on is at most 3-way already, and we don't store 1-way conflicts, so we should be able to assume that it's exactly a 3-way conflict. --- src/merge_tools.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/merge_tools.rs b/src/merge_tools.rs index b34fb2842..57400c320 100644 --- a/src/merge_tools.rs +++ b/src/merge_tools.rs @@ -187,9 +187,9 @@ pub fn run_mergetool( vec![] }; let files: HashMap<&str, _> = maplit::hashmap! { - "base" => content.removes.pop().unwrap_or_default(), - "right" => content.adds.pop().unwrap_or_default(), - "left" => content.adds.pop().unwrap_or_default(), + "base" => content.removes.pop().unwrap(), + "right" => content.adds.pop().unwrap(), + "left" => content.adds.pop().unwrap(), "output" => initial_output_content.clone(), };