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

repo: make check_out() call edit()

This reduces duplication a little, and it makes logical sense.
This commit is contained in:
Martin von Zweigbergk 2023-01-22 21:34:17 -08:00 committed by Martin von Zweigbergk
parent dd3472924b
commit 4777508df0

View file

@ -747,7 +747,6 @@ impl MutableRepo {
settings: &UserSettings,
commit: &Commit,
) -> BackendResult<Commit> {
self.leave_commit(&workspace_id);
let wc_commit = self
.new_commit(
settings,
@ -755,8 +754,7 @@ impl MutableRepo {
commit.tree_id().clone(),
)
.write()?;
self.set_wc_commit(workspace_id, wc_commit.id().clone())
.unwrap();
self.edit(workspace_id, &wc_commit).unwrap();
Ok(wc_commit)
}