Add a Vim modeline "textwidth=70" to force commit comments to wrap
at 70 characters, to match standard Git commit style guidelines.
Reduce the commit summary length to 62 characters, which is the
maximum that can fit after "Subject: [PATCH] " when formatting a
patch for email. This is still above the recommended 50 character
summary limit, but with the leading ticket number and component,
there wouldn't be very much room left for a meaningful comment.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I04f8e0278a18a869b78acbf9dd1b55adf354500c
Reviewed-on: http://review.whamcloud.com/3284
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by \
CC \
| tr ' ' '|')
- readonly WIDTH_SUM=64
+ readonly WIDTH_SUM=62
readonly WIDTH_REG=70
readonly JIRA_FMT_A="^[A-Z]\{2,5\}-[0-9]\{1,5\} [-a-z0-9]\{2,9\}: "
readonly JIRA_FMT_B="^[A-Z]\{2,5\}-[0-9]\{1,5\} "
echo "" >> "$1"
echo "#" >> "$1"
git diff --cached | $CHECKPATCH $CHECKPATCH_OPTS - | sed -e 's/^/# /' >> "$1"
+echo "# vim:textwidth=70:" >> "$1"