Skip to content

Commit

Permalink
repo: add MutableRepo::merge_index
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjmnt4n committed May 18, 2024
1 parent 1f6c1a9 commit ae92af0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,10 @@ impl MutableRepo {
self.view.mark_dirty();
}

pub fn merge_index(&mut self, other_repo: &ReadonlyRepo) {
self.index.merge_in(other_repo.readonly_index());
}

fn merge_view(&mut self, base: &View, other: &View) {
// Merge working-copy commits. If there's a conflict, we keep the self side.
for (workspace_id, base_wc_commit) in base.wc_commit_ids() {
Expand Down

0 comments on commit ae92af0

Please sign in to comment.