Skip to content

Commit

Permalink
style(config): order available hooks same as on source page
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Dec 3, 2024
1 parent a4ff6fa commit 7bea211
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions internal/config/available_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,37 @@ 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": {},
"post-receive": {},
"post-update": {},
"reference-transaction": {},
"push-to-checkout": {},
"pre-auto-gc": {},
"post-rewrite": {},
"rebase": {},
"reference-transaction": {},
"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 7bea211

Please sign in to comment.