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

Add workspace config #3670

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HybridEidolon
Copy link
Contributor

This adds support for per-workspace configuration as was described as a TODO in the LayeredConfig struct. Like repo configuration in .jj/repo/config.toml, the workspace config goes in .jj/config.toml in the workspace root, and its settings take precedence over repo, user and default configs.

The config subcommands that take --user and --repo are additionally given --workspace which behaves as one would expect.

Checklist

If applicable:

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

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.

You missed to cargo +nightly fmt the code and a additional test for the workspace level feature. If you fix that LGTM.

cli/src/commands/config.rs Outdated Show resolved Hide resolved
cli/tests/test_config_command.rs Show resolved Hide resolved
@HybridEidolon HybridEidolon force-pushed the workspace-config branch 3 times, most recently from 9737caa to 01b8970 Compare May 12, 2024 18:26
cli/tests/test_config_command.rs Outdated Show resolved Hide resolved
cli/tests/test_config_command.rs Show resolved Hide resolved
cli/src/config.rs Show resolved Hide resolved
This adds support for per-workspace configuration as was
described as a TODO in the LayeredConfig struct. Like repo
configuration in `.jj/repo/config.toml`, the workspace config
goes in `.jj/config.toml` in the workspace root, and its
settings take precedence over repo, user and default configs.

The config subcommands that take `--user` and `--repo` are
additionally given `--workspace` which behaves as one would
expect.
@ilyagr
Copy link
Collaborator

ilyagr commented May 13, 2024

Just FYI, you had a flaky test failure, I re-ran the testing job for you. You should be able to re-run it as well, I think, in the Actions tab.

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.

None yet

4 participants