From b079897a56988fab4c64968491643ba669299f2c Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Mon, 23 Jan 2023 22:09:49 -0800 Subject: [PATCH] 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. --- src/cli_util.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cli_util.rs b/src/cli_util.rs index e7e11b9fd..1e46edf65 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -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)?;