summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2020-12-17 20:31:45 +0000
committerEd Maste <emaste@FreeBSD.org>2020-12-17 20:31:45 +0000
commitf3fec471a3303e372943b610d38b59905c385a11 (patch)
tree4f62028a4462c1af4c90b53660a62bd63587b5c6 /tools
parenta095390344fb1795c1b118a2f84da8f6a7f254ab (diff)
downloadsrc-test-f3fec471a3303e372943b610d38b59905c385a11.tar.gz
src-test-f3fec471a3303e372943b610d38b59905c385a11.zip
Describe the commit message template our git hook script produces
Reported by: rpokala
Notes
Notes: svn path=/head/; revision=368740
Diffstat (limited to 'tools')
-rwxr-xr-xtools/tools/git/hooks/prepare-commit-msg11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg
index 2da681db5599a..9e623371447f5 100755
--- a/tools/tools/git/hooks/prepare-commit-msg
+++ b/tools/tools/git/hooks/prepare-commit-msg
@@ -16,8 +16,17 @@ merge)
esac
outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX)
-cat >$outfile <<EOF
+# Create a commit message template from three parts:
+#
+# 1. The beginning of the git-provided template (up to the first comment-only
+# line) which explains commented lines and such.
+# 2. Our template.
+# 3. The remainder of the git-provided template (from the first comment-only
+# line to the end of the file) which lists files staged for commit, files
+# not staged, and untracked files.
+
+cat >$outfile <<EOF
$(awk '1;/^#$/{exit}' $1)
# Uncomment and complete these metadata fields, as appropriate:
#