Print git-diff when pre-commit fails 16/64216/1
authorThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:43:00 +0000 (09:43 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 6 Jun 2020 13:44:22 +0000 (09:44 -0400)
commit56d0ecd70c54b1839d5e7aeb3030ac4c27dcb142
tree5a3d86608f2915f8a2c98404c79924f55a8cb86e
parentf8156667ecaae577ab90fc724cf21c6d5c54814b
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: I0c9fc6afa8be214d03e342b2913205e946aa901e
tox.ini