You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trunk check fails before running any linters when a Git repository uses extensions.relativeWorktrees. An ordinary git worktree add --relative-paths is sufficient, and the failure affects both the original checkout and the linked worktree.
Environment
Trunk CLI: 1.22.6 (pinned in .trunk/trunk.yaml)
Git: 2.54.0 (Apple Git-157)
macOS 27.0.1, Apple Silicon
Later Trunk versions have not been tested.
Minimal reproduction
This uses a fresh Git repository:
git init trunk-relative-repro
cd trunk-relative-repro
mkdir .trunk
cat > .trunk/trunk.yaml <<'EOF'version: 0.1cli: version: 1.22.6lint: enabled: []EOFprintf'Minimal reproduction.\n'> README.md
git add .trunk/trunk.yaml README.md
git -c commit.gpgsign=false commit -m 'Add minimal Trunk configuration'
trunk check --all
# Exit 0: Found no applicable linters for anything in your repository
git worktree add --detach --relative-paths ../trunk-relative-linked HEAD
# The shared Git config now contains extensions.relativeWorktrees = true.
trunk check --all
# Exit 2:# ✖ Git Error: unsupported extension name extensions.relativeworktreescd ../trunk-relative-linked
trunk check --all
# Exit 2 with the same error.
I tested this Git-only reproduction: the baseline exits 0, and both checkouts exit 2 after adding the relative worktree. The issue was originally encountered in a colocated jj (jujutsu) workspace, but jj is not necessary to reproduce it. The ordinary trunk check command also fails with this error in the affected development checkout.
Expected behavior
Trunk should recognize repositories with relative worktree links and run its normal checks in both the original checkout and linked worktrees.
The error resembles libgit2/libgit2#7210, fixed by libgit2/libgit2#7254. I have not confirmed which Git library/version Trunk bundles, but that fix may be relevant:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
trunk checkfails before running any linters when a Git repository usesextensions.relativeWorktrees. An ordinarygit worktree add --relative-pathsis sufficient, and the failure affects both the original checkout and the linked worktree.Environment
.trunk/trunk.yaml)Minimal reproduction
This uses a fresh Git repository:
I tested this Git-only reproduction: the baseline exits 0, and both checkouts exit 2 after adding the relative worktree. The issue was originally encountered in a colocated jj (jujutsu) workspace, but jj is not necessary to reproduce it. The ordinary
trunk checkcommand also fails with this error in the affected development checkout.Expected behavior
Trunk should recognize repositories with relative worktree links and run its normal checks in both the original checkout and linked worktrees.
Related upstream work
Git documents
extensions.relativeWorktreesas recording that at least one worktree uses relative paths: https://git-scm.com/docs/git-config#Documentation/git-config.txt-relativeWorktreesThe error resembles libgit2/libgit2#7210, fixed by libgit2/libgit2#7254. I have not confirmed which Git library/version Trunk bundles, but that fix may be relevant:
Could Trunk support this repository extension, or confirm whether a newer CLI release already includes support?
All reactions