diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-01-17 15:17:09 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-01-17 15:17:09 +0900 |
commit | 30d8e25233f4cd9a1f3d43531f474af1040f3120 (patch) | |
tree | a90bff3efb3c872f42441daa11ee82790eff2f3f /contrib | |
parent | c225268743b7571b1b6a326e34e002b3a4f40d2f (diff) | |
download | gnunet-30d8e25233f4cd9a1f3d43531f474af1040f3120.tar.gz gnunet-30d8e25233f4cd9a1f3d43531f474af1040f3120.zip |
build: update git hooks again and fix autmatic installation on bootstrap
Diffstat (limited to 'contrib')
-rwxr-xr-x[-rw-r--r--] | contrib/conf/commit-msg | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | contrib/conf/prepare-commit-msg | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/contrib/conf/commit-msg b/contrib/conf/commit-msg index daa526270..7e6ec65ee 100644..100755 --- a/contrib/conf/commit-msg +++ b/contrib/conf/commit-msg | |||
@@ -16,7 +16,7 @@ do | |||
16 | then | 16 | then |
17 | RET=1 | 17 | RET=1 |
18 | # Check if it has a ChangeLog line | 18 | # Check if it has a ChangeLog line |
19 | if cat $COMMIT_MSG_FILE | grep \^ChangeLog: > /dev/null | 19 | if cat $COMMIT_MSG_FILE | grep "^ChangeLog:\s*[-,a-zA-Z][a-zA-Z]*" > /dev/null |
20 | then | 20 | then |
21 | RET=0 | 21 | RET=0 |
22 | break | 22 | break |
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. |
27 | if [ $RET = 1 ]; | 27 | if [ -z "$COMMIT_SOURCE" ]; |
28 | then | 28 | then |
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" | ||
36 | fi | 38 | fi |
37 | exit 0 | 39 | exit 0 |