Skip to content

Commit

Permalink
fix: reorder available hooks list (#884)
Browse files Browse the repository at this point in the history
* style(config): order available hooks same as on source page

* fix(config): remove `rebase` from available hooks

It is not actually a hook, but an argument to the `post-rewrite` hook.

https://git-scm.com/docs/githooks#Documentation/githooks.txt-rebase
  • Loading branch information
scop authored Dec 4, 2024
1 parent a4ff6fa commit df484d9
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions internal/config/available_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ const ChecksumFileName = "lefthook.checksum"
const GhostHookName = "prepare-commit-msg"

// AvailableHooks - list of hooks taken from https://git-scm.com/docs/githooks.
// Keep the order of the hooks same here for easy syncing.
var AvailableHooks = map[string]struct{}{
"pre-commit": {},
"pre-push": {},
"commit-msg": {},
"applypatch-msg": {},
"fsmonitor-watchman": {},
"p4-changelist": {},
"p4-post-changelist": {},
"p4-pre-submit": {},
"p4-prepare-changelist": {},
"post-applypatch": {},
"post-checkout": {},
"post-commit": {},
"post-index-change": {},
"post-merge": {},
"post-receive": {},
"post-rewrite": {},
"post-update": {},
"pre-applypatch": {},
"pre-auto-gc": {},
"post-applypatch": {},
"pre-commit": {},
"pre-merge-commit": {},
"prepare-commit-msg": {},
"commit-msg": {},
"post-commit": {},
"pre-rebase": {},
"post-checkout": {},
"post-merge": {},
"pre-push": {},
"pre-receive": {},
"prepare-commit-msg": {},
"update": {},
"proc-receive": {},
"push-to-checkout": {},
"rebase": {},
"post-receive": {},
"post-update": {},
"reference-transaction": {},
"push-to-checkout": {},
"pre-auto-gc": {},
"post-rewrite": {},
"sendemail-validate": {},
"update": {},
"fsmonitor-watchman": {},
"p4-changelist": {},
"p4-prepare-changelist": {},
"p4-post-changelist": {},
"p4-pre-submit": {},
"post-index-change": {},
}

func HookUsesStagedFiles(hook string) bool {
Expand Down

0 comments on commit df484d9

Please sign in to comment.