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

Implement "config set" subcommand #1312

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Implement "config set" subcommand #1312

merged 1 commit into from
Mar 1, 2023

Conversation

dbarnett
Copy link
Contributor

@dbarnett dbarnett commented Feb 26, 2023

Uses toml_edit to support simple config edits like:
jj config set --repo user.email "[email protected]"

Fixes #531.

Checklist

If applicable:

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

@dbarnett
Copy link
Contributor Author

Hmm, my "cargo fmt" isn't wrapping these lines but the "Check formatting" insists the long line needs to be wrapped. Any idea why? I just did rustup update.

-    // TODO(#531): Infer types based on schema, and support --type arg to explicitly specify.
+    // TODO(#531): Infer types based on schema, and support --type arg to explicitly
+    // specify.

@martinvonz
Copy link
Member

Hmm, my "cargo fmt" isn't wrapping these lines but the "Check formatting" insists the long line needs to be wrapped. Any idea why? I just did rustup update.

-    // TODO(#531): Infer types based on schema, and support --type arg to explicitly specify.
+    // TODO(#531): Infer types based on schema, and support --type arg to explicitly
+    // specify.

We use the nightly version in CI (I don't remember if there's a good reason for that), so try cargo +nightly fmt and see if that's the difference.

@dbarnett dbarnett requested a review from yuja February 26, 2023 23:36
src/cli_util.rs Outdated Show resolved Hide resolved
src/cli_util.rs Outdated Show resolved Hide resolved
src/cli_util.rs Outdated Show resolved Hide resolved
src/cli_util.rs Outdated Show resolved Hide resolved
src/cli_util.rs Outdated Show resolved Hide resolved
@dbarnett dbarnett force-pushed the config-set branch 2 times, most recently from d50384f to 17ce84f Compare February 28, 2023 03:58
@dbarnett dbarnett requested a review from yuja February 28, 2023 04:07
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

src/cli_util.rs Outdated Show resolved Hide resolved
src/cli_util.rs Show resolved Hide resolved
src/cli_util.rs Show resolved Hide resolved
@dbarnett dbarnett force-pushed the config-set branch 2 times, most recently from 31d4a0d to 367199f Compare March 1, 2023 01:34
Uses toml_edit to support simple config edits like:
  jj config set --repo user.email "[email protected]"
@dbarnett dbarnett merged commit 99cb0ba into main Mar 1, 2023
@dbarnett dbarnett deleted the config-set branch March 1, 2023 02:18
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.

jj should have a thing like git config ...
3 participants