+usage() {
+ cat << USAGE
+
+Normally '$0' is invoked automatically by "git commit".
+
+See https://wiki.whamcloud.com/display/PUB/Commit+Comments
+for full details. A good example of a valid commit comment is:
+
+ LU-nnnnn component: short description of change under 64 columns
+
+ The "component:" should be a lower-case single-word subsystem of the
+ Lustre code best covering the patch. Example components include:
+ llite, lov, lmv, osc, mdc, ldlm, lnet, ptlrpc, mds, oss, osd,
+ ldiskfs, libcfs, socklnd, o2iblnd, recovery, quota, grant,
+ build, tests, docs. This list is not exhaustive, but a guideline.
+
+ The comment body should explan the change being made. This can be
+ as long as needed. Please include details of the problem that was
+ solved (including error messages that were seen), a good high-level
+ description of how it was solved, and which parts of the code were
+ changed (including important functions that were changed, if this
+ is useful to understand the patch, and for easier searching).
+ Performance patches should quanify the improvements being seen.
+ Wrap lines at/under $WIDTH_REG columns. Only ASCII text allowed.
+
+ Optionally, if the patch is backported from master, include links
+ to the original patch to simplify tracking it across branches/repos:
+
+ $LUSTRE_CHANGE $GERRIT_URL/nnnn
+ $LUSTRE_COMMIT 40-char-git-hash-of-patch-on-master
+ or
+ $LUSTRE_COMMIT TBD (from 40-char-hash-of-unlanded-patch)
+
+ Finish the comment with a blank line followed by the signoff section.
+ The "$CHANGEID" line should only be present when updating a previous
+ commit/submission. Keep the same $CHANGEID for ported patches. It
+ will automatically be added by the Git commit-msg hook if missing.
+
+ $TEST_PARAMS extra test options, see https://wiki.whamcloud.com/x/dICC
+ $FIXES 12-char-hash ("commit summary line of original broken patch")
+ $SIGNOFF Your Real Name <your_email@domain.name>
+ $CHANGEID Ixxxx(added automatically if missing)xxxx
+
+ The "signoff section" may optionally include other reviewer lines:
+ $(for T in $(tr '|' ' ' <<< "$EMAILS"); do \
+ echo " $T: Some Person <email@example.com>"; \
+ done)
+ {Organization}-bug-id: associated external change identifier
+USAGE
+}
+
+[[ "$1" == "--help" ]] && init && usage && exit 0
+