Skip to content

Convert skipHookPrefix to skipHookPrefixes (string to []string)#5338

Open
slavshik wants to merge 1 commit intojesseduffield:masterfrom
slavshik:fix-skip-hook-prefixes
Open

Convert skipHookPrefix to skipHookPrefixes (string to []string)#5338
slavshik wants to merge 1 commit intojesseduffield:masterfrom
slavshik:fix-skip-hook-prefixes

Conversation

@slavshik
Copy link

@slavshik slavshik commented Mar 4, 2026

Summary

  • Converts git.skipHookPrefix (single string) to git.skipHookPrefixes (array of strings), allowing users to specify multiple prefixes that skip git hooks (e.g. ["WIP", "fixup!", "squash!", "amend!"])
  • Adds a config migration from the old skipHookPrefix scalar to the new skipHookPrefixes sequence for backward compatibility
  • Default value remains ["WIP"] preserving existing behavior

Closes #2275

Test plan

  • make build — compiles successfully
  • go test ./... -short — all unit tests pass
  • make lint — no lint errors
  • make generate — schema/docs regenerated
  • New test cases for multiple prefixes in CommitCmdObj, CreateFixupCommit, CreateAmendCommit
  • Migration test cases: old field only, new field only, both present, neither present

🤖 Generated with Claude Code

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.

Allow precommit-bypassing fixup! commit

1 participant