ok/jj
1
0
Fork 0
forked from mirrors/jj

repo: add MutableRepo::merge_index

This commit is contained in:
Benjamin Tan 2024-05-02 16:29:31 +08:00
parent ddc601fbf9
commit 87ea9102f0

View file

@ -1564,6 +1564,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() {