Hi. There's a small improvement. When filling up the ChangeLog entries, I see it handy to open a patch in a separate window. I would use GCC_DIFF_FILE env. variable for saving of the diff file.
Thoughts? Martin
>From bffc1bdd709b5152f290febb334b009c2f225872 Mon Sep 17 00:00:00 2001 From: Martin Liska <mli...@suse.cz> Date: Tue, 26 May 2020 09:08:31 +0200 Subject: [PATCH] prepare-commit-msg: Save diff if requested by user. contrib/ChangeLog: * prepare-commit-msg: Save diff to a file if the GCC_DIFF_FILE variable is set. --- contrib/prepare-commit-msg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg index 820dacc7e42..b2123317308 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_DIFF_FILE" ]; then + git $cmd > "$GCC_DIFF_FILE"; +fi + git $cmd | git gcc-mklog -c "$COMMIT_MSG_FILE" -- 2.26.2