git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-cvsserver: support multiline commit messages
@ 2006-07-26 19:59 Johannes Schindelin
  0 siblings, 0 replies; only message in thread
From: Johannes Schindelin @ 2006-07-26 19:59 UTC (permalink / raw)
  To: git, junkio, Martin Langhoff


Earlier, cvsserver barfed when you tried to check in files with a 
multiline commit message.

That is what Argumentx is for... Argument: lines can be followed by
several Argumentx: lines, which means they should be appended.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 git-cvsserver.perl |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index b2837ad..1b70cd9 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -549,12 +549,15 @@ sub req_Argument
 {
     my ( $cmd, $data ) = @_;
 
-    # TODO :  Not quite sure how Argument and Argumentx differ, but I assume
-    # it's for multi-line arguments ... somehow ...
+    # Argumentx means: append to last Argument (with a newline in front)
 
     $log->debug("$cmd : $data");
 
-    push @{$state->{arguments}}, $data;
+    if ( $cmd eq 'Argumentx') {
+        ${$state->{arguments}}[$#{$state->{arguments}}] .= "\n" . $data;
+    } else {
+        push @{$state->{arguments}}, $data;
+    }
 }
 
 # expand-modules \n
-- 
1.4.2.rc2.g96f2-dirty

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-26 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-26 19:59 [PATCH] git-cvsserver: support multiline commit messages Johannes Schindelin

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).