Print git-diff when pre-commit fails 17/64217/2
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:48:59 +0000 (09:48 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:15:05 +0000 (10:15 -0400)
commiteb3e1660f2426ca3d5a068c28de3140dfc9764f7
treee44de55c20beb7b96a6b9e69d30f42a3a477ac47
parent5cae729944bf3fed74a3bb1f2cd1ff10b682c442
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: Icd6484c8c4157d38885b1de460517d9b656a06d7
tox.ini