Skip to content

Recognize amend aliases on macOS - #2

Closed
apiology wants to merge 4 commits into
mainfrom
match-amend-aliases-on-macos
Closed

apiology wants to merge 4 commits into
mainfrom
match-amend-aliases-on-macos

Conversation

@apiology

Copy link
Copy Markdown
Owner

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

Problem

On macOS, amending through a git alias isn't recognized as an amend:

$ git config alias.amend "commit --amend"
# no output, exit 1: macOS git does not understand \s
$ git config --get-regexp '^alias\.' 'commit(\s.*)?\s--amend(\s|$)'

Hooks that treat amends specially (e.g. including the previous commit's changes) misbehave for macOS users who amend via an alias, and the four #amendment? alias specs fail there.

Solution

Spell the pattern with the POSIX [[:space:]] class, which macOS git, Linux git and Ruby's regex engine all understand.

apiology and others added 4 commits October 20, 2026 03:07
macOS git's regex library does not support `\s`, so
`git config --get-regexp` never matched an alias for `commit --amend`
and amendment? returned false. Use the POSIX `[[:space:]]` class,
which both git and Ruby understand.

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
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#904

@apiology apiology closed this Oct 21, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39672811024

Coverage at 92.064% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 3604
Covered Lines: 3318
Line Coverage: 92.06%
Coverage Strength: 3261.05 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