Skip to content

Commit

Permalink
rewrite: delete TODOs about labels for each term in a conflict
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
martinvonz committed Jul 5, 2023
1 parent 3d3c405 commit 184346d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/src/rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
};
Expand All @@ -104,7 +103,6 @@ pub fn back_out_commit(
) -> Result<Commit, TreeMergeError> {
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()
Expand Down

0 comments on commit 184346d

Please sign in to comment.