-
-
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
Merged
Byron
merged 14 commits into
GitoxideLabs:main
from
SidneyDouw:config-extension-worktree
Dec 3, 2022
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2d9b2f1
fix typo in docs
23d8474
add test for worktree configs
760e736
load worktree config if necessary
7ebf229
remove worktree permission configuration option…
394aab9
refactor…
ae812bd
refactor…
5c2b44c
exclude fixture archive from being uploaded…
33992ab
fix type - prevent creating a fixture archive
bea689a
remove `canonicalize` calls from test…
b69f219
test to check if worktree overrides shared configs
a191948
Assure that worktree configuration is marked as such with `Source::Wo…
Byron 75488a7
improve documentation about the configuration we always load
Byron 62afb7b
move tests::repository::config::worktree to `tests::repository::open:…
Byron 2d83222
refactor
Byron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/make_worktree_repo.tar.xz | ||
/make_worktree_repo_with_configs.tar.xz | ||
/make_remote_repos.tar.xz | ||
/make_fetch_repos.tar.xz | ||
/make_core_worktree_repo.tar.xz |
29 changes: 29 additions & 0 deletions
29
git-repository/tests/fixtures/make_worktree_repo_with_configs.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -eu -o pipefail | ||
|
||
git init repo | ||
|
||
(cd repo | ||
touch a b c | ||
git add . | ||
git commit -m initial | ||
|
||
git worktree add ../wt-1 | ||
git worktree add ../wt-2 | ||
|
||
git config extensions.worktreeConfig true | ||
git config --worktree worktree.setting "set in the main worktree" | ||
|
||
git config shared.setting "set in the shared config" | ||
git config override.setting "set in the shared config" | ||
) | ||
|
||
(cd wt-1 | ||
git config --worktree worktree.setting "set in wt-1" | ||
) | ||
|
||
(cd wt-2 | ||
git config --worktree worktree.setting "set in wt-2" | ||
git config --worktree override.setting "override in wt-2" | ||
) |
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
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.
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.