git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Cogito] Remove heading and trailing empty lines from commit messages
@ 2005-05-12 20:44 Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2005-05-12 20:44 UTC (permalink / raw)
  To: Petr Baudis; +Cc: GIT Mailing List

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

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>


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 365 bytes --]

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
 
 

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH Cogito] Remove heading and trailing empty lines from commit messages
@ 2005-05-09  0:28 Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2005-05-09  0:28 UTC (permalink / raw)
  To: Petr Baudis; +Cc: GIT Mailing List

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

Hi Petr,

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

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 389 bytes --]

cg-commit: needs update
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
 
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-12 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-12 20:44 [PATCH Cogito] Remove heading and trailing empty lines from commit messages Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-05-09  0:28 Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).