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"