Skip to content

FIX: Use git rev-parse --git-dir to locate COMMIT_EDITMSG - #86

Merged
thclark merged 1 commit into
mainfrom
fix/worktree-commit-message-path-v2
Jun 16, 2026
Merged

thclark merged 1 commit into
mainfrom
fix/worktree-commit-message-path-v2

Conversation

@thclark

@thclark thclark commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fixes the worktree support from FIX: Support git worktrees and migrate to pyproject.toml/uv #85. The previous approach added a positional commit_message_file argument, but pre-commit doesn't pass the commit message file path to commit-msg hooks, so the hook failed with error: the following arguments are required: commit_message_file.
  • Uses git rev-parse --git-dir to locate COMMIT_EDITMSG instead. This returns the worktree-specific git directory in worktrees (e.g. .git/worktrees/<name>/) and .git in regular repos, so it works in both cases without any arguments.
  • Bumps version to 0.9.2.

Test plan

  • All 29 tests pass locally with 100% coverage
  • CI passes

Contents (#86)

Fixes

  • Read commit message from file path argument instead of hardcoded .git path

@thclark
thclark merged commit 793fece into main Jun 16, 2026
6 checks passed
@thclark
thclark deleted the fix/worktree-commit-message-path-v2 branch June 16, 2026 18:19
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