prepare-commit-hook: Use gcc-config.diff-file.

contrib/ChangeLog:

	* prepare-commit-msg: Replace ENV variable with a git config
	value.
This commit is contained in:
Martin Liska 2020-06-11 10:02:26 +02:00
parent 9aadfdd650
commit 8ff57396d6
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785

View File

@ -58,8 +58,9 @@ else
fi
# Save diff to a file if requested.
if ! [ -z "$GCC_GIT_DIFF_FILE" ]; then
tee="tee $GCC_GIT_DIFF_FILE"
DIFF_FILE=$(git config gcc-config.diff-file)
if ! [ -z "$DIFF_FILE" ]; then
tee="tee $DIFF_FILE"
else
tee="cat"
fi