Skip to contentSkip to conversation

Remove heading and trailing empty lines from commit messages

PATCH New Marcel Holtmann 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove heading and trailing empty lines from commit messages

Hi Petr,

the attached patch removes heading and trailing empty lines from the commit message before doing the commit.

Regards

Marcel

cg-commit: needs update
Index: cg-commit
===================================================================

cg-commit (mode:100755) +1 -1
@@ -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