From: Marcel Holtmann Date: Thu, 12 May 2005 20:44:30 GMT Subject: [PATCH Cogito] Remove heading and trailing empty lines from commit messages 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 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