prepare-commit-hook: Use gcc-config.diff-file.
authorMartin Liska <mliska@suse.cz>
Thu, 11 Jun 2020 08:02:26 +0000 (10:02 +0200)
committerMartin Liska <mliska@suse.cz>
Thu, 11 Jun 2020 08:09:47 +0000 (10:09 +0200)
contrib/ChangeLog:

* prepare-commit-msg: Replace ENV variable with a git config
value.

contrib/prepare-commit-msg

index 57bb91747f68f96d9dcc597ef7ec6c710c985ce4..cc9ba2e6ba1dadde6496934441297c06d5ec7906 100755 (executable)
@@ -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