Print git-diff when pre-commit fails 27/64227/1
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:07:50 +0000 (10:07 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 14:08:00 +0000 (10:08 -0400)
commit6770638b583155459cb43fff5305e5b4b02d98b7
treef8c336ccdf6c5fbcbe2ac0a5c024f135614621d0
parent4efe302572042b2eda3e56f09c1e1279e8eb0809
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.

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