I have installed overcommit[1] as a pre-commit hook. It outputs ANSI escape 
sequences to set colors, and these are rendered as follows in the magit-process 
buffer:


 [1mRunning pre-commit hooks [0m

 [32m✓ All pre-commit hooks passed [0m

Waiting for Emacs...
 [1mRunning commit-msg hooks [0m
Checking subject capitalization..................[CapitalizedSubject]  [32mOK 
[0m
Checking subject line.............................[SingleLineSubject]  [32mOK 
[0m
Checking text width.......................................[TextWidth]  [32mOK 
[0m
Checking for trailing periods in subject.............[TrailingPeriod]  [32mOK 
[0m

 [32m✓ All commit-msg hooks passed [0m


I am not sure who is at fault here. overcommit appears to be doing the right 
thing by testing whether its output is a tty, at least at a quick glance at its 
code. Maybe magit is telling git not to output colors, but still communicating 
with git using a pseudoterminal, so that git hook scripts believe they are 
running in a terminal?

[1] https://github.com/brigade/overcommit

-- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to