From 651a3cbe15d7c8b76e94dbd23125f84fa8fc82bd Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 5 Jul 2023 05:55:17 -0700 Subject: [PATCH] rewrite: delete TODOs about labels for each term in a conflict I don't think we'll want to record a label for each term, because such labels would get stale, and it seems hard to make them make sense after transferring a remote to another repo. I think we'll probably want to infer labels on demand instead (#1176). --- lib/src/backend.rs | 2 -- lib/src/rewrite.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/src/backend.rs b/lib/src/backend.rs index aa77a5c7e2..b33f7f3181 100644 --- a/lib/src/backend.rs +++ b/lib/src/backend.rs @@ -154,8 +154,6 @@ content_hash! { content_hash! { #[derive(Debug, PartialEq, Eq, Clone)] pub struct ConflictTerm { - // TODO: Store e.g. CommitId here too? Labels (theirs/ours/base)? Would those still be - // useful e.g. after rebasing this conflict? pub value: TreeValue, } } diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index a2588ac2e6..04393fb119 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -81,7 +81,6 @@ pub fn rebase_commit( } else { let old_base_tree = merge_commit_trees(mut_repo, &old_parents)?; let new_base_tree = merge_commit_trees(mut_repo, new_parents)?; - // TODO: pass in labels for the merge parts let merged_tree = merge_trees(&new_base_tree, &old_base_tree, &old_commit.tree())?; merged_tree.id().clone() }; @@ -104,7 +103,6 @@ pub fn back_out_commit( ) -> Result { let old_base_tree = merge_commit_trees(mut_repo, &old_commit.parents())?; let new_base_tree = merge_commit_trees(mut_repo, new_parents)?; - // TODO: pass in labels for the merge parts let new_tree = merge_trees(&new_base_tree, &old_commit.tree(), &old_base_tree).unwrap(); let new_parent_ids = new_parents .iter()