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

cleanup: inline some short single-use mut_repo variables

This commit is contained in:
Martin von Zweigbergk 2024-09-07 08:55:53 -07:00 committed by Martin von Zweigbergk
parent 5fbc819fc1
commit e5e95225d4
2 changed files with 4 additions and 4 deletions

View file

@ -108,8 +108,8 @@ don't make any changes, then the operation will be aborted.",
if tree_id == *target_commit.tree_id() {
writeln!(ui.status(), "Nothing changed.")?;
} else {
let mut_repo = tx.mut_repo();
let new_commit = mut_repo
let new_commit = tx
.mut_repo()
.rewrite_commit(command.settings(), &target_commit)
.set_tree_id(tree_id)
.write()?;

View file

@ -109,8 +109,8 @@ pub(crate) fn cmd_restore(
writeln!(ui.status(), "Nothing changed.")?;
} else {
let mut tx = workspace_command.start_transaction();
let mut_repo = tx.mut_repo();
let new_commit = mut_repo
let new_commit = tx
.mut_repo()
.rewrite_commit(command.settings(), &to_commit)
.set_tree_id(new_tree_id)
.write()?;