Skip to content
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

cli: add simpler --config=NAME=VALUE argument #5102

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Conversation

yuja
Copy link
Collaborator

@yuja yuja commented Dec 15, 2024

#3867

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@yuja yuja force-pushed the push-lpktqkqoxtmq branch from 1dbe09a to 85af7fa Compare December 15, 2024 12:44
Copy link
Collaborator

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, just a minor correction and a actual nit.

cli/src/commands/config/set.rs Outdated Show resolved Hide resolved
cli/src/cli_util.rs Outdated Show resolved Hide resolved
cli/src/commands/config/set.rs Show resolved Hide resolved
@yuja yuja force-pushed the push-lpktqkqoxtmq branch from 85af7fa to d26d470 Compare December 16, 2024 02:54
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll probably replace all uses of --config-toml and mark --config-toml as deprecated.

SGTM

cli/src/cli_util.rs Outdated Show resolved Hide resolved
yuja added 4 commits December 17, 2024 10:19
The same parsing function will be used for --config NAME=VALUE.

I don't think we'll add schema-based type inference anytime soon, so I moved
the value parsing to clap layer.
…me type

This will simplify handling of multiple ConfigArg items of the same type.
Consecutive --config NAME=VALUE arguments will be inserted to the same
ConfigLayer.
Spotted while adding --config NAME=VALUE.
This supersedes jj-vcs#3867. I'll probably replace all uses of --config-toml and
mark --config-toml as deprecated.
@yuja yuja force-pushed the push-lpktqkqoxtmq branch from d26d470 to 20091c2 Compare December 17, 2024 01:22
@yuja yuja enabled auto-merge (rebase) December 17, 2024 01:23
@yuja yuja merged commit 60078e9 into jj-vcs:main Dec 17, 2024
18 checks passed
@yuja yuja deleted the push-lpktqkqoxtmq branch December 17, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants