-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(git-worktree): auto-trust mise and direnv configs in new worktrees #312
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
tmchow
merged 11 commits into
EveryInc:main
from
NimbleEngineer21:feat/git-worktree-trust-dev-tools
Mar 21, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c25d98e
feat(git-worktree): auto-trust mise and direnv configs in new worktrees
NimbleEngineer21 bdb688f
fix(git-worktree): address review feedback on trust_dev_tools
NimbleEngineer21 0565780
fix(git-worktree): compare trust configs against default branch, not …
NimbleEngineer21 3fab2fb
fix(git-worktree): use origin/ ref and safe fallback for default bran…
NimbleEngineer21 bad2a46
fix(git-worktree): address review findings from multi-agent analysis
NimbleEngineer21 9428d31
fix(git-worktree): fix dead code in _config_unchanged, broken skip ou…
NimbleEngineer21 369be4c
fix(git-worktree): use git rev-parse for base hash in _config_unchanged
NimbleEngineer21 2d2e1bb
fix(git-worktree): skip trust when origin/$default_branch ref is missing
NimbleEngineer21 a80e4f1
fix(git-worktree): address review findings from multi-agent analysis
NimbleEngineer21 ef900e7
fix(git-worktree): final review polish
NimbleEngineer21 72149fc
fix(git-worktree): tighten dev tool trust guardrails
NimbleEngineer21 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
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.
If
git fetch origin "$trust_branch"fails (offline/auth/transient errors), the script still proceeds totrust_dev_toolsas long as a localorigin/$trust_branchref exists, which may be stale; that can incorrectly classify changed.mise/.envrcfiles as unchanged and auto-trust them. Fresh evidence in this commit: after the failed fetch warning, the code still calls trust on the basis ofgit rev-parse --verify "origin/$trust_branch"rather than requiring a successful refresh. This should fail closed by skipping auto-trust whenever the fetch step fails.Useful? React with 👍 / 👎.
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.
This is an intentional design decision. I chose to proceed with stale-but-present refs (with a warning), skip entirely when the ref doesn't exist locally. Failing closed on every fetch failure would break auto-trust for offline developers or flaky VPN connections, which is a common scenario. The stale-ref risk is low: a false positive requires the config to have changed upstream while the local ref hasn't been updated, and even then the worktree was just created from
from_branchso the developer is working with that content regardless. Therev-parse --verifycheck ensures we fail closed when there's truly no baseline to compare against.