Print git-diff when pre-commit fails 98/90398/1
authorThanh Ha <zxiiro@gmail.com>
Thu, 11 Jun 2020 14:17:48 +0000 (10:17 -0400)
committerThanh Ha <zxiiro@gmail.com>
Thu, 11 Jun 2020 14:21:43 +0000 (10:21 -0400)
commit66891da217539c65b6017d8ac297494f1d5ea06d
tree344b0f930fc8d2a407342dd56f00e755645f0c0a
parentaf2382e061803df4f357864f4bd97d18c10f39d7
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: Ia4dc73f6a6b044fd75705fb6985a49419a3014cb
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
tox.ini