Skip to content

Keep each worktree's signatures separate - #1

Closed
apiology wants to merge 4 commits into
mainfrom
store-signatures-per-worktree
Closed

apiology wants to merge 4 commits into
mainfrom
store-signatures-per-worktree

Conversation

@apiology

Copy link
Copy Markdown
Owner

Claude: This PR was written by Claude Code on behalf of @apiology.

Problem

Signing in one git worktree breaks commits in the others:

$ cd main && overcommit --sign
$ cd ../linked && overcommit --sign   # .overcommit.yml differs here
$ cd ../main && git commit
# Signature of configuration file has changed!
# Run `overcommit --sign` once you've verified the configuration changes.

Anyone whose worktrees carry different .overcommit.yml files or hook plugins (e.g. branches that change the config) has to re-sign on every switch.

Solution

When extensions.worktreeConfig is enabled, signatures and the recorded verify_signatures choice are read and written with git config --worktree instead of --local, so each worktree keeps its own; without the extension --worktree fails in a repo with linked worktrees (fatal: --worktree cannot be used with multiple working trees unless the config extension worktreeConfig is enabled), so behaviour there is unchanged.

apiology and others added 3 commits October 20, 2026 02:58
Signatures live in the shared repository config, so signing in one
worktree invalidates every other worktree whose configuration or hooks
differ. When extensions.worktreeConfig is enabled, read and write them
with `git config --worktree` instead; without the extension `--worktree`
fails in a repo with linked worktrees, so `--local` remains the default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wo4FerFK9aaxrGrmVE9ncZ
ubuntu-latest now resolves to ubuntu-26.04, for which setup-ruby has
no Ruby 2.6-3.1 builds ("Unavailable version 3.0.7 for ruby on
ubuntu-26.04"), so those matrix entries fail before running specs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wo4FerFK9aaxrGrmVE9ncZ
Name ubuntu-26.04 explicitly so runners do not move when ubuntu-latest
does. setup-ruby has no Ruby 2.6-3.1 builds for ubuntu-26.04, so a
matrix include keeps those rows on ubuntu-24.04. Non-ubuntu rows still
use <os>-latest. The explicit job name keeps check names as
"rspec (<ruby>, <os>)", which upstream requires.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wo4FerFK9aaxrGrmVE9ncZ
@apiology
apiology changed the base branch from master to main October 21, 2026 13:37
@apiology apiology closed this Oct 21, 2026
@apiology apiology reopened this Oct 21, 2026
@apiology
apiology marked this pull request as ready for review October 21, 2026 20:42
Merge pin-ci-runner-to-ubuntu-24.04 (sds#902) so the rspec
checks for Ruby 2.6 through 3.1 run on ubuntu-24.04, where setup-ruby
still has those versions. This merge drops out once sds#902 lands
upstream.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wo4FerFK9aaxrGrmVE9ncZ
@apiology

Copy link
Copy Markdown
Owner Author

Claude: Moved upstream to sds#903

@apiology apiology closed this Oct 21, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39672806112

Coverage at 92.027% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 2 uncovered changes across 1 file (6 of 8 lines covered, 75.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
lib/overcommit/configuration.rb 3 1 33.33%
Total (3 files) 8 6 75.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3612
Covered Lines: 3324
Line Coverage: 92.03%
Coverage Strength: 3256.42 hits per line

💛 - Coveralls

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.

2 participants