forked from mirrors/jj
cleanup: inline some short single-use mut_repo
variables
This commit is contained in:
parent
5fbc819fc1
commit
e5e95225d4
2 changed files with 4 additions and 4 deletions
|
@ -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()?;
|
||||
|
|
|
@ -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()?;
|
||||
|
|
Loading…
Reference in a new issue