DORMANTno replies

[PATCH] git-cvsserver: support multiline commit messages

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:34
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help