[PATCH Cogito] Remove heading and trailing empty lines from commit messages
- From
- Marcel Holtmann <marcel@holtmann.org>
- Date
- May 12, 2005, 20:44 UTC
- Message-ID
- <1115930670.18499.64.camel@pegasus>
Hi Petr,
the attached patch removes heading and trailing empty lines from the commit message before doing the commit.
Regards
Marcel
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Index: cg-commit =================================================================== --- 00b94eea5b99d5dd1d1bbe9c9ca3502d11aec581/cg-commit (mode:100755) +++ uncommitted/cg-commit (mode:100755) @@ -134,7 +134,7 @@ else cat >>$LOGMSG2 fi -grep -v ^CG: $LOGMSG2 >$LOGMSG +grep -v ^CG: $LOGMSG2 | sed '/./,${/./b;:a;$d;N;/\n$/ba;b;};d' >$LOGMSG rm $LOGMSG2