Skip to content

chore: fix changeset pre-push hook in linked worktrees#86

Draft
MaximusHaximus wants to merge 1 commit into
masterfrom
chore/pre-push-worktree-fix
Draft

chore: fix changeset pre-push hook in linked worktrees#86
MaximusHaximus wants to merge 1 commit into
masterfrom
chore/pre-push-worktree-fix

Conversation

@MaximusHaximus

Copy link
Copy Markdown
Contributor

Git exports GIT_DIR/GIT_WORK_TREE to hooks running inside linked git worktrees (e.g. ones created via git worktree add). Those variables make changeset status's own git subprocesses read the linked gitdir instead of the worktree's actual tree, so the pre-push hook falsely reports "no changesets found" even when a valid changeset exists.

This syncs .husky/pre-push with apps-team-ts-template's canonical version, which unsets both variables before invoking changesets. CI/tooling-only — no runtime or package changes.

https://claude.ai/code/session_01928TnCS4kMQPd6uVTewNSN

Git exports GIT_DIR/GIT_WORK_TREE to hooks running in linked worktrees,
which makes `changeset status` read the wrong gitdir and falsely report
no changesets. Sync the hook with apps-team-ts-template, which unsets
both before invoking changesets.

Claude-Session: https://claude.ai/code/session_01928TnCS4kMQPd6uVTewNSN
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant