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

cli: propagate failure to record new working-copy id

This code cannot currently fail because we we never pass in the root
commit, but it's more future-proof to propagate the error.
This commit is contained in:
Martin von Zweigbergk 2023-01-23 22:09:49 -08:00 committed by Martin von Zweigbergk
parent ce094c618b
commit b079897a56

View file

@ -860,9 +860,7 @@ impl WorkspaceCommandHelper {
.rewrite_commit(&self.settings, &wc_commit)
.set_tree(new_tree_id)
.write()?;
mut_repo
.set_wc_commit(workspace_id, commit.id().clone())
.unwrap();
mut_repo.set_wc_commit(workspace_id, commit.id().clone())?;
// Rebase descendants
let num_rebased = mut_repo.rebase_descendants(&self.settings)?;