-
-
Notifications
You must be signed in to change notification settings - Fork 354
git-repository
loads worktree configs
#635
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
git-repository
loads worktree configs
#635
Conversation
…if worktree configs exist they should always be read
…because creating worktrees with `git` creates a .git file in the worktree that points to the git_dir using an absolute path, so every tester has to generate that fixture from scratch.
…and use CARGO_MANIFEST_DIR instead
…rktree`. This also resets the original behaviour of reading `$COMMON_DIR/config` as `Source::Local`.
…:worktree` As these settings are relevant during opening and aren't queried later as part of implementations in `repository::config` or `config`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, I absolutely like how spot-on the addition of worktree configuration support is in the bootstrapping sequence of the repository.
As a note and for future reference, it's important to properly classify configuration using their git_config::Source
- each section has metadata attached by which it can be filtered and that's relevant to how much we can 'trust' these values.
It's great to see that finally gitoxide
is able to properly start up and load everything that matters, laying the ground work for handling massive monorepos correctly soon enough :).
|
||
(cd wt-2 | ||
git config --worktree worktree.setting "set in wt-2" | ||
git config --worktree override.setting "override in wt-2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting values so they describe their purpose and show up in the tests like this works really well! Thank you.
Give
git-repository
the capability to load worktree specific configuration files, if the appropriate setting (extensions.worktreeConfig
) is set in the main config file.Tasks
config.worktree
filesgit-repository