From ee98d1eee8c8cb76fd97236d01adbcb404c2bb9b Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Mon, 12 Jun 2023 05:37:39 -0700 Subject: [PATCH] tree: remove check for conflict-simplification resulting in deletion Since we switched to the new `conflicts::Conflict` type, we represent a missing tree entry by a `None` value in the conflict, not a missing "add", so the condition removed in this commit will never happen, and the case will be handled by the case just below it instead. --- lib/src/tree.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/src/tree.rs b/lib/src/tree.rs index 6940831df..24f90c760 100644 --- a/lib/src/tree.rs +++ b/lib/src/tree.rs @@ -629,10 +629,6 @@ fn merge_tree_value( ); let filename = dir.join(basename); let conflict = simplify_conflict(store, &filename, conflict)?; - if conflict.adds().is_empty() { - // If there are no values to add, then the path doesn't exist - return Ok(None); - } if conflict.removes().is_empty() && conflict.adds().len() == 1 { // A single add means that the current state is that state. return Ok(conflict.adds()[0].clone());