mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-05 20:55:05 +00:00
index: duplicate add_commit() to MutableIndexImpl
This commit is contained in:
parent
e0206a82f2
commit
ce312ae288
1 changed files with 9 additions and 5 deletions
|
@ -465,6 +465,14 @@ impl MutableIndexImpl {
|
|||
CompositeIndex(self)
|
||||
}
|
||||
|
||||
fn add_commit(&mut self, commit: &Commit) {
|
||||
self.add_commit_data(
|
||||
commit.id().clone(),
|
||||
commit.change_id().clone(),
|
||||
commit.parent_ids(),
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn add_commit_data(
|
||||
&mut self,
|
||||
commit_id: CommitId,
|
||||
|
@ -729,11 +737,7 @@ impl MutableIndex for MutableIndexImpl {
|
|||
}
|
||||
|
||||
fn add_commit(&mut self, commit: &Commit) {
|
||||
self.add_commit_data(
|
||||
commit.id().clone(),
|
||||
commit.change_id().clone(),
|
||||
commit.parent_ids(),
|
||||
);
|
||||
self.add_commit(commit);
|
||||
}
|
||||
|
||||
fn merge_in(&mut self, other: &dyn ReadonlyIndex) {
|
||||
|
|
Loading…
Reference in a new issue