Skip to content

Setting a user.name is confusing with jj config set if the name contains a comma #5233

@ilyagr

Description

@ilyagr

This may or may not be related to #5231, but is inspired by #5231 (comment) .

I find the following a little confusing:

$ rm /tmp/jj-config.toml
$ # This works fine on a UNIXy shell (fish in my case)
$ JJ_CONFIG=/tmp/jj-config.toml ~/.cargo/bin/jj config set --user user.name "I G"
Warning: This setting will only impact future commits.
The author of the working copy will stay "Ilya Grigoriev <ilyagr@users.noreply.github.com>".
To change the working copy author, use "jj describe --reset-author --no-edit"

$ # Add a comma, and it breaks
$ JJ_CONFIG=/tmp/jj-config.toml ~/.cargo/bin/jj config set --user user.name "G, I"
error: invalid value 'G, I' for '<VALUE>': TOML parse error at line 1, column 1
  |
1 | G, I
  | ^
invalid string
expected `"`, `'`


For more information, try '--help'.

$ # Workaround
$ JJ_CONFIG=jj-config.toml ~/.cargo/bin/jj config set --user user.name '"G, I"'
Warning: This setting will only impact future commits.
The author of the working copy will stay "Ilya Grigoriev <ilyagr@users.noreply.github.com>".
To change the working copy author, use "jj describe --reset-author --no-edit"

I wonder whether this kind of username is common enough so that it'd make sense to allow commas in strings, or change the rules in some other ways. (I don't think this is an urgent problem by itself, unless we get complaints.)

Metadata

Metadata

Assignees

No one assigned

    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