Program hangs if repo uses prepare-commit-hook that requires user input
- Lingua principale
- Rust
- Stelle
- 22.5k
- Fork
- 773
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Describe the bug**
If a repo implements a prepare-commit-msg which requires user input gitui will hang on various operations that trigger the hook (commit, rebase, merge, cherry pick).
This is a pretty common pattern in repos using commitizen as one of the options that the project recommends is using [prepare-commit-msg](https://github.com/commitizen/cz-cli#traditional-git-hooks)
**To Reproduce**
minimal example here: https://github.com/jaredmcateer/cz-gitui
Steps to reproduce the behavior:
1. Open repo with prepare-commit-msg that requires user input
2. Add/Modify a file
3. Stage file
4. Go to 'staged change' in gitui
5. Press 'c'
7. Observe gitui is unresponsive
**Screenshots**
In your processes you will see something like this:

**Context (please complete the following information):**
- OS/Distro + Version: tested on Mac OS Sonoma 14.7.1 & Pop_OS! 22.0.4 LTS
- GitUI Version: gitui nightly 2025-03-04 ()
- Rust version: rustc 1.82.0 (f6e511eec 2024-10-15)
**Additional context**
Lazygit also suffers from this, and the current workaround is to override all the commit-like commands with custom keybindings to disable Husky, but that will also kill other useful things like pre-commit hooks that run tests/linters.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo il blocco con il repository minimo cz-gitui collegato e un hook prepare-commit-msg che richieda input, quindi traccia i percorsi di gitui attivati da commit, rebase, merge e cherry-pick. Confronta il modo in cui queste operazioni gestiscono l'input e l'output dell'hook. Il lavoro è completato quando gli hook interattivi possono ricevere input senza che gitui diventi non responsivo, mentre gli altri hook continuano a essere eseguiti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, rust
- Ambito
- cli, devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100