revset: clarify error about missing working-copy commit for workspace

The error message that says something like 'Workspace "default"
doesn't have a working copy' confused me when I saw it. The problem
it's describing is that the repo view doesn't have a working-copy
commit for the given workspace id. Saying "working-copy commit"
instead of "working copy" hopefully clarifies it a bit.
This commit is contained in:
Martin von Zweigbergk 2024-06-19 16:14:00 -07:00 committed by Martin von Zweigbergk
parent 68b8b1a6a6
commit 494de23ea5
2 changed files with 2 additions and 2 deletions

View file

@ -643,7 +643,7 @@ fn test_workspaces_forget() {
// Revision "@" cannot be used
let stderr = test_env.jj_cmd_failure(&main_path, &["log", "-r", "@"]);
insta::assert_snapshot!(stderr, @r###"
Error: Workspace "default" doesn't have a working copy
Error: Workspace "default" doesn't have a working-copy commit
"###);
// Try to add back the workspace

View file

@ -53,7 +53,7 @@ pub enum RevsetResolutionError {
name: String,
candidates: Vec<String>,
},
#[error("Workspace \"{name}\" doesn't have a working copy")]
#[error("Workspace \"{name}\" doesn't have a working-copy commit")]
WorkspaceMissingWorkingCopy { name: String },
#[error("An empty string is not a valid revision")]
EmptyString,