guillaumeaubert/App-GitHooks

Account for git-commit trimming trailing whitespace by default

guillaumeaubert opened this issue · 1 comments

Per http://git-scm.com/docs/git-commit:

--cleanup=
This option determines how the supplied commit message should be cleaned up before committing. The can be strip, whitespace, verbatim, scissors or default.

strip
Strip leading and trailing empty lines, trailing whitespace, and #commentary and collapse consecutive empty lines.

whitespace
Same as strip except #commentary is not removed.

verbatim
Do not change the message at all.

scissors
Same as whitespace, except that everything from (and including) the line "# ------------------------ >8 ------------------------" is truncated if the message is to be edited. "#" can be customized with core.commentChar.

default
Same as strip if the message is to be edited. Otherwise whitespace.

Released in version 1.5.1.