pre-commit: check for whitespace errors in on all files under gdb

I got a review comment [1] because I forgot to run

    git diff --staged --check

to check commits before submitting. This commit adds a pre-commit hook
to do this automatically.

Approved-By: Simon Marchi <simon.marchi@efficios.com>

[1]: https://inbox.sourceware.org/gdb-patches/c231d267-f541-4774-8005-6d433a9d6e96@simark.ca/
2 files changed