From 1e83faf4f8234674674330c198f512c1a8cf74d6 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 29 Mar 2024 19:48:13 +0900 Subject: [PATCH] tree: remove useless "Backend error" message from TreeMergeError I don't think it adds any contextual information. TreeMergeError is somewhat similar to BackendError. --- cli/tests/test_abandon_command.rs | 4 +--- lib/src/tree.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/tests/test_abandon_command.rs b/cli/tests/test_abandon_command.rs index 43f786178..ea510aa8b 100644 --- a/cli/tests/test_abandon_command.rs +++ b/cli/tests/test_abandon_command.rs @@ -317,9 +317,7 @@ fn test_bug_2600_rootcommit_special_case() { let stderr = test_env.jj_cmd_internal_error(&repo_path, &["abandon", "base"]); insta::assert_snapshot!(stderr, @r###" Internal error: Merge failed - Caused by: - 1: Backend error - 2: The Git backend does not support creating merge commits with the root commit as one of the parents. + Caused by: The Git backend does not support creating merge commits with the root commit as one of the parents. "###); } diff --git a/lib/src/tree.rs b/lib/src/tree.rs index 23690ff6a..e1b4c70a6 100644 --- a/lib/src/tree.rs +++ b/lib/src/tree.rs @@ -41,7 +41,7 @@ pub enum TreeMergeError { source: std::io::Error, file_id: FileId, }, - #[error("Backend error")] + #[error(transparent)] BackendError(#[from] BackendError), }