diff options
| -rwxr-xr-x | contrib/prepare-commit-msg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/prepare-commit-msg b/contrib/prepare-commit-msg index 75d1025..9387b33 100755 --- a/contrib/prepare-commit-msg +++ b/contrib/prepare-commit-msg @@ -78,4 +78,9 @@ else tee="cat" fi -git $cmd --default-prefix | $tee | git gcc-mklog -c "$COMMIT_MSG_FILE" +# Use --default-prefix if supported +if git diff --help | grep -q "\-\-default-prefix" 2>/dev/null; then + cmd="$cmd --default-prefix" +fi + +git $cmd | $tee | git gcc-mklog -c "$COMMIT_MSG_FILE" |
