-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jj should have a thing like git config ...
#531
Comments
|
I'd like to attempt this one. Seems like a good place to start to get familiar with the structure of the code before trying for some others I'm interested to tackle. |
Great! Yes, this should be a very good starter task. You probably don't even need any pointers because it's probably just a matter of updating the command arguments ( |
You're using describe as just an example, right? Or are you saying |
Partially fixes jj-vcs#531.
Yeah, I'll need to figure out all of that to support "set", but I just did "get" and "list" for now which are simpler. |
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
Partially fixes jj-vcs#531.
This issue was about editing configs via |
Oh yes, agreed. I think GitHub's detection was a little over-eager where I said "partially fixes". |
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Part of #531 to define the overall `config` command.
Side comment: That GitHub spam from all the force-pushed commits is really annoying. Is that WAI or is there a better way I should be pushing commits? |
It's really annoying, so I personally try to keep the issue references in the pull request instead of the commit (which is unfortunate for other reasons)... |
Planning to add a A few other follow-ups I'm planning to work on:
|
K, I'm forking these improvement ideas for |
Any suggestion for the case where user config path is a directory? Some cases are straightforward, but when there are multiple files in the config dir precedence could get tricky. Ideal could be:
I'd like to not overthink this case, but unfortunately I can't really have a test for |
Your proposal is reasonable... |
I think it's also fine to error out if the config path is a directory. In tests, we can override the path with |
Oh, true. Didn't think to override it to a file path. One other gotcha will be inferring the value types. Easiest is to assume every value is a string, and maybe have an explicit arg for specifying other value types. Should also be possible to infer some types based on the config schema, but that's going to be a little complex to implement and will never be foolproof. |
We have the global |
I think requiring toml syntax will be awkward. Just to set a simple string value you'd need two layers of quoting like Probably time to go check how mercurial and git handle these cases... |
Oh, mercurial doesn't have any direct Considering the whole command is a convenience helper, I'd vote to keep it pretty simplistic and infer number/boolean/string with a |
|
Okay! It's certainly not perfect, but we have We might still want to reference that new command in the hint for new users to set up name/email at https://github.com/martinvonz/jj/blob/99cb0ba7c5cef0d8b53dbfe64a168764e50a4dc2/src/cli_util.rs#L1045, though. |
Description
Learning to edit
toml
isn't going to be top of anyone's minds when they start usingjj
. Ajj config
would mean they don't need toSteps to Reproduce the Problem
Expected Behavior
jj config user.name '...'
jj config user.email '...'
Actual Behavior
Specifications
The text was updated successfully, but these errors were encountered: