From: Martin Liska Date: Tue, 26 May 2020 07:08:31 +0000 (+0200) Subject: prepare-commit-msg: Save diff if requested by user. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7b8ee33affd968d3a8f5f6224268702d1900f0a1;p=gcc.git prepare-commit-msg: Save diff if requested by user. contrib/ChangeLog: * prepare-commit-msg: Save diff to a file if the GCC_GIT_DIFF_FILE variable is set. --- diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg index 820dacc7e42..fd59bfbcf88 100755 --- a/contrib/prepare-commit-msg +++ b/contrib/prepare-commit-msg @@ -54,4 +54,9 @@ else exit 0 fi +# Save diff to a file if requested. +if ! [ -z "$GCC_GIT_DIFF_FILE" ]; then + git $cmd > "$GCC_GIT_DIFF_FILE"; +fi + git $cmd | git gcc-mklog -c "$COMMIT_MSG_FILE"