diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/prepare-commit-msg | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg index 24f0783aae2..57bb91747f6 100755 --- a/contrib/prepare-commit-msg +++ b/contrib/prepare-commit-msg @@ -59,7 +59,9 @@ fi # Save diff to a file if requested. if ! [ -z "$GCC_GIT_DIFF_FILE" ]; then - git $cmd > "$GCC_GIT_DIFF_FILE"; + tee="tee $GCC_GIT_DIFF_FILE" +else + tee="cat" fi -git $cmd | git gcc-mklog -c "$COMMIT_MSG_FILE" +git $cmd | $tee | git gcc-mklog -c "$COMMIT_MSG_FILE" |