mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-31 23:25:09 +00:00
cli: when untracking paths, release lock after finishing transaction
This commit is contained in:
parent
8c97fdf5d6
commit
7103860f7e
@ -1633,11 +1633,12 @@ fn cmd_untrack(
|
||||
let new_commit = CommitBuilder::for_rewrite_from(ui.settings(), &store, &old_commit)
|
||||
.set_tree(new_tree_id)
|
||||
.write_to_repo(tx.mut_repo());
|
||||
tx.mut_repo().set_checkout(new_commit.id().clone());
|
||||
// TODO: We shouldn't write a reference to new_commit in the working copy until
|
||||
// the transaction has committed.
|
||||
let num_rebased = rebase_descendants(ui.settings(), tx.mut_repo());
|
||||
if num_rebased > 0 {
|
||||
writeln!(ui, "Rebased {} descendant commits", num_rebased)?;
|
||||
}
|
||||
tx.commit();
|
||||
locked_working_copy.finish(new_commit.id().clone());
|
||||
workspace_command.finish_transaction(ui, tx)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user