Print git-diff when pre-commit fails 24/64224/1
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:01:53 +0000 (10:01 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:02:05 +0000 (10:02 -0400)
commitf14e1f6a4bef92cb92ffd9ed9dabbbf30d30724a
tree500afa666968951b32baa74066e1869097b22cd1
parentdbd3a53616793745f078c16eb62405ef6919907c
Print git-diff when pre-commit fails

When pre-commit fails and automatically fixes issues for us in Jenkins
we are not able to see what pre-commit automatically fixed. Adding
--show-diff-on-failure makes pre-commit perform a git-diff immediately
after failing to ensure more useful output is printed to inform the
contributor what changes are needed to pass the check.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ic2ad49fd6222bee0341c4826e6ccc463d05fda5f
tox.ini