fix(jj): load user config so committer signature is set#202
Open
madmo wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
ec9c403 to
312b45a
Compare
cococonscious
requested changes
May 22, 2026
| /// | ||
| /// Ported from jj cli/src/config.rs `env_base_layer`. | ||
| #[cfg(feature = "jj")] | ||
| fn jj_env_base_layer() -> jj_lib::config::ConfigLayer { |
Owner
There was a problem hiding this comment.
Please add some tests for the new methods.
Author
There was a problem hiding this comment.
Sure, took me some time, but now the new functionality has some tests. Thanks for reviewing!
6e00ea4 to
e3fe0be
Compare
cococonscious
requested changes
Jun 10, 2026
Previously, jj_load_repo used StackedConfig::with_defaults() which only contains empty strings for user.name and user.email. When rewrite_commit is called, jj-lib sets the committer field from settings.signature(), resulting in an empty committer that prevents pushing to git remotes. Port the config-loading helpers from the jj CLI (env_base_layer, env_overrides_layer, UnresolvedConfigEnv::resolve) and wire them together so that the StackedConfig is built with the same layer ordering as the jj CLI: Default, EnvBase, User, Repo, EnvOverrides.
e3fe0be to
138fd01
Compare
Author
Good point, the attribution part was really on the minimal side. Now it should be enough to cover the requirements of the Apache-2.0 license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, jj_load_repo used StackedConfig::with_defaults() which only contains empty strings for user.name and user.email. When rewrite_commit is called, jj-lib sets the committer field from settings.signature(), resulting in an empty committer that prevents pushing to git remotes.
Port the config-loading helpers from the jj CLI (env_base_layer, env_overrides_layer, UnresolvedConfigEnv::resolve) and wire them together so that the StackedConfig is built with the same layer ordering as the jj CLI: Default, EnvBase, User, Repo, EnvOverrides.