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 57bb917..cc9ba2e 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