Showing the changes to lib/src/commit.rs (1 of 5 files). Show all
Unified · Split
| @@ -20,7 +20,7 @@ use std::hash::{Hash, Hasher}; · 19 unmodified lines | ||
| 20 | 20 | use std::sync::Arc; |
| 21 | 21 | |
| 22 | 22 | use crate::backend; |
| 23 | −use crate::backend::{BackendError, ChangeId, CommitId, MergedTreeId, Signature, TreeId}; | |
| 23 | +use crate::backend::{BackendError, ChangeId, CommitId, MergedTreeId, Signature}; | |
| 24 | 24 | use crate::merged_tree::MergedTree; |
| 25 | 25 | use crate::repo_path::RepoPath; |
| 26 | 26 | use crate::store::Store; |
| @@ -113,12 +113,6 @@ impl Commit { · 86 unmodified lines | ||
| 113 | 113 | self.store.get_root_tree(&self.data.root_tree) |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | − // TODO(#1624): delete when all callers have been updated to support tree-level | |
| 117 | − // conflicts | |
| 118 | − pub fn tree_id(&self) -> &TreeId { | |
| 119 | − self.data.root_tree.as_legacy_tree_id() | |
| 120 | − } | |
| 121 | − | |
| 122 | 116 | pub fn merged_tree_id(&self) -> &MergedTreeId { |
| 123 | 117 | &self.data.root_tree |
| 124 | 118 | } |
| @@ -148,7 +142,7 @@ impl Commit { · 23 unmodified lines | ||
| 148 | 142 | pub fn is_discardable(&self) -> bool { |
| 149 | 143 | if self.description().is_empty() { |
| 150 | 144 | if let [parent_commit] = &*self.parents() { |
| 151 | − return self.tree_id() == parent_commit.tree_id(); | |
| 145 | + return self.merged_tree_id() == parent_commit.merged_tree_id(); | |
| 152 | 146 | } |
| 153 | 147 | } |
| 154 | 148 | false |