Skip to content

Commit

Permalink
tree: remove useless "Backend error" message from TreeMergeError
Browse files Browse the repository at this point in the history
I don't think it adds any contextual information. TreeMergeError is somewhat
similar to BackendError.
  • Loading branch information
yuja committed Mar 30, 2024
1 parent 6d6841e commit 1e83faf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cli/tests/test_abandon_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"###);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub enum TreeMergeError {
source: std::io::Error,
file_id: FileId,
},
#[error("Backend error")]
#[error(transparent)]
BackendError(#[from] BackendError),
}

Expand Down

0 comments on commit 1e83faf

Please sign in to comment.