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

cli: add warrant to identity-not-configured message

The impact of not having configured one's name and email is not apparent from the warning message. Under the Toulmin model:

- Claim (implicit): You should configure your name and email.
- Grounds: Your name and email are not currently configured.
- Warrant (currently missing): Configuring your name and email will let you do...
This commit is contained in:
Waleed Khan 2023-03-30 11:18:13 -07:00
parent bf03e557c1
commit 4c629f3aa6
2 changed files with 3 additions and 3 deletions

View file

@ -1086,7 +1086,7 @@ impl WorkspaceCommandHelper {
{
writeln!(
ui.warning(),
r#"Name and email not configured. Add something like the following to $HOME/.jjconfig.toml:
r#"Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, add something like the following to $HOME/.jjconfig.toml:
user.name = "Some One"
user.email = "someone@example.com""#
)?;

View file

@ -342,7 +342,7 @@ fn test_no_user_configured() {
.assert()
.success();
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
Name and email not configured. Add something like the following to $HOME/.jjconfig.toml:
Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, add something like the following to $HOME/.jjconfig.toml:
user.name = "Some One"
user.email = "someone@example.com"
"###);
@ -352,7 +352,7 @@ fn test_no_user_configured() {
.assert()
.success();
insta::assert_snapshot!(get_stderr_string(&assert), @r###"
Name and email not configured. Add something like the following to $HOME/.jjconfig.toml:
Name and email not configured. Until configured, your commits will be created with the empty identity, and can't be pushed to remotes. To configure, add something like the following to $HOME/.jjconfig.toml:
user.name = "Some One"
user.email = "someone@example.com"
"###);