From df484d9ebb2e0a48f7a80cc895faa0a37a3f1bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 4 Dec 2024 06:20:14 -0100 Subject: [PATCH] fix: reorder available hooks list (#884) * 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 --- internal/config/available_hooks.go | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/internal/config/available_hooks.go b/internal/config/available_hooks.go index 17e208f5..68927f81 100644 --- a/internal/config/available_hooks.go +++ b/internal/config/available_hooks.go @@ -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 {