Print git-diff when pre-commit fails 20/64220/2
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:54:01 +0000 (09:54 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:55:23 +0000 (09:55 -0400)
commita3485b34f3f0ee1b929cb6a245fb37bca16708c9
treeb59927a6dbfb78ebd35a338bf10ba0977e0aac8b
parentece2f5dbcd2412fd0c0a02bb607c4dae62c6f807
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: Ia291e121a0882374e1f13180a237f89bde9be68b
tox.ini