aboutsummaryrefslogtreecommitdiff
path: root/contrib/conf/prepare-commit-msg
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/conf/prepare-commit-msg')
-rwxr-xr-x[-rw-r--r--]contrib/conf/prepare-commit-msg12
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/conf/prepare-commit-msg b/contrib/conf/prepare-commit-msg
index 60aaa2894..16b4279ad 100644..100755
--- a/contrib/conf/prepare-commit-msg
+++ b/contrib/conf/prepare-commit-msg
@@ -24,14 +24,16 @@ done
24# ($COMMIT_SOURCE is empty). Otherwise, keep the default message 24# ($COMMIT_SOURCE is empty). Otherwise, keep the default message
25# proposed by Git. Possible commit source: message, template, 25# proposed by Git. Possible commit source: message, template,
26# merge, squash or commit. 26# merge, squash or commit.
27if [ $RET = 1 ]; 27if [ -z "$COMMIT_SOURCE" ];
28then 28then
29 if [ -z "$COMMIT_SOURCE" ] || [ "message" == "$COMMIT_SOURCE" ]; 29 hint=$(cat "$COMMIT_MSG_FILE")
30 echo ": Fixes #" > "$COMMIT_MSG_FILE"
31 echo -e "# Our commit subject format policy is:\n# <subsystem>: <description>\n# Adding 'Issue #1234'/'Fixes #1234' into the description will automatically update/resolve issue #1234 in mantis." >> "$COMMIT_MSG_FILE"
32 if [ $RET = 1 ];
30 then 33 then
31 hint=$(cat "$COMMIT_MSG_FILE") 34 echo -e "\n# Your commit includes staged changes that indicate an API change which requires a ChangeLog line." >> "$COMMIT_MSG_FILE"
32 echo -e "\n# Your commit includes staged changes that indicate an API change which requires a ChangeLog line. This info line will be ignored." > "$COMMIT_MSG_FILE"
33 echo "ChangeLog: " >> "$COMMIT_MSG_FILE" 35 echo "ChangeLog: " >> "$COMMIT_MSG_FILE"
34 echo "$hint" >> "$COMMIT_MSG_FILE"
35 fi 36 fi
37 echo "$hint" >> "$COMMIT_MSG_FILE"
36fi 38fi
37exit 0 39exit 0