From 8ff57396d6dea4976b05902919070aa0e562354d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 11 Jun 2020 10:02:26 +0200 Subject: [PATCH] prepare-commit-hook: Use gcc-config.diff-file. contrib/ChangeLog: * prepare-commit-msg: Replace ENV variable with a git config value. --- contrib/prepare-commit-msg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg index 57bb91747f6..cc9ba2e6ba1 100755 --- a/contrib/prepare-commit-msg +++ b/contrib/prepare-commit-msg @@ -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 -- 2.30.2