Skip to content

Commit c4fb7b8

Browse files
committed
docs: add note about git hook TTY to README
1 parent e2bfce1 commit c4fb7b8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,24 @@ See more on [this blog post](https://medium.com/@tomchentw/imagemin-lint-staged-
613613

614614
## Frequently Asked Questions
615615

616+
### The output of commit hook looks weird (no colors, duplicate lines, …)
617+
618+
<details>
619+
<summary>Click to expand</summary>
620+
621+
Git 2.36.0 introduced a change to hooks where they were no longer run in the original TTY.
622+
This was fixed in 2.37.0:
623+
624+
https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.37.0.txt
625+
626+
> - In Git 2.36 we revamped the way how hooks are invoked. One change
627+
> that is end-user visible is that the output of a hook is no longer
628+
> directly connected to the standard output of "git" that spawns the
629+
> hook, which was noticed post release. This is getting corrected.
630+
> (merge [a082345372](https://github.com/git/git/commit/a082345372) ab/hooks-regression-fix later to maint).
631+
632+
</details>
633+
616634
### Can I use `lint-staged` via node?
617635

618636
<details>

0 commit comments

Comments
 (0)