Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

hooks: register Entire as a Git config-based hook on Git 2.54+

Aperta
#2,580 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
git, go
Ambito
cli, devtools

Direzione di ricerca

Start by tracing the existing five hook registrations, the Lefthook integration in lefthook-local.yml, and the status and doctor delivery checks. Review #2388's Git-version detection approach and the listed migration, uninstall, worktree, and mixed-version questions. Done means Git 2.54+ registration, coexistence, migration, and delivery checks work without duplicate or missing captures.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Summary

Git 2.54 added config-based hooks (hook.<name>.event + hook.<name>.command). Git runs them in addition to the file in the hooks directory. On Git 2.54+ Entire could register its five hooks there instead of owning .git/hooks/*, which would end the ownership fights with every hook manager at once.

What was verified (Git 2.55.0, built from source; hk 2.1.0)

  • A config hook and a .git/hooks/<name> file for the same event both run. The config hook runs first.
  • Both receive the same arguments and the same stdin: pre-push gets origin <url> and one ref line on stdin, and post-rewrite gets amend and one rewrite pair.
  • hook.<name>.enabled=false disables a single entry.
  • hk 2.x already works this way (hook.hk-pre-commit.command), and its hooks compose with Entire's native hooks with no interference.

Why it matters

  • Lefthook (#2388): Entire currently runs as a Lefthook job, so LEFTHOOK=0 skips Entire too. Lefthook's launcher exits before reading any config, so a commit made that way is never linked to a checkpoint. A config hook isn't inside Lefthook's launcher, so LEFTHOOK=0 couldn't skip it, and Lefthook's constant reclaiming of .git/hooks/* wouldn't matter.
  • Husky, pre-commit, Overcommit, legacy hk: these overwrite .git/hooks/* at install time. Today Entire repairs that on the next agent turn, and commits made in between aren't captured. A config hook is never overwritten.
  • status and doctor delivery checks (#2264) get simpler, since nothing else writes where Entire registers.

Open design questions

  1. Mixed git versions on one repo. A GUI client with an older bundled git ignores hook.* config. If Entire drops its .git/hooks files on 2.54+, those clients silently capture nothing. If it keeps both, Git 2.54+ runs Entire twice per event. Options: keep both and have the .git/hooks copy skip when the running git honours config hooks, or accept dedup at the handler level.
  2. Coexistence with the Lefthook integration. On 2.54+, Entire should probably stop registering in lefthook-local.yml, or every hook runs twice.
  3. Scope. Local repo config (git config --local), matching per-clone .git/hooks today. Worktrees share .git/config, so check extensions.worktreeConfig and linked-worktree behaviour.
  4. Migration and uninstall. Moving existing installs, entire disable --uninstall, and doctor --force all need to learn the new location. GIT_DIR/-C hook environments behave as today.
  5. Detection. Decide on a git --version check (the approach #2388 uses for hk's warning) versus probing git hook list <event>.

Related

#2264, #1349, #2263, #2388 (the LEFTHOOK=0 limitation is documented there), #2577 (the carry-forward fix for commits made with hooks skipped).

🤖 Generated with Claude Code

Lingua principale
Go
Stelle
5.1k
Fork
475
Merge medio
1g 17h
PR unite (30g)
212

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di entireio/cli

Tutte le issue di entireio/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.