Skip to content

Setting a name with jj config set user.name with odd characters results in an unfriendly parser error #5748

@ephemeralctl

Description

@ephemeralctl

Description

Upon following the instructions in my terminal to set a name with jj config set --user user.name, I was presented with a very unusual error:

$ jj config set --user user.name "Micheal D'Angelo"
error: invalid value 'Micheal D'Angelo' for '<VALUE>': TOML parse error at line 1, column 1
  |
1 | Micheal D'Angelo
  | ^
invalid string
expected `"`, `'`

For more information, try '--help'.

Steps to Reproduce the Problem

Here is the full flow that I, as an end user, experienced to get to this point:

$ jj git init
Error: Did not create a jj repo because there is an existing Git repo in this directory.
Hint: To create a repo backed by the existing Git repo, run `jj git init --colocate` instead.

$ jj git init --colocate
Done importing changes from the underlying Git repo.
Setting the revset alias `trunk()` to `prod@origin`
Hint: The following remote bookmarks aren't associated with the existing local bookmarks:
  prod@origin
  some-branch@origin
Hint: Run `jj bookmark track prod@origin some-branch@origin` to keep local bookmarks updated on future pulls.                                                                                         Initialized repo in "."

$ jj bookmark track prod@origin some-branch@origin
Started tracking 2 remote bookmarks.
Warning: 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, run:
  jj config set --user user.name "Some One"
  jj config set --user user.email "someone@example.com"

Specifications


Perhaps for configuration fields of a known type (such as a name which we know is a string), these should be interpreted as a string rather than as a TOML table?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions