@matheusbsbs / matheus-bagliano / commits / 2c3cff4930
Fork 0

git-cvsserver: support multiline commit messages

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> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Jul 26, 2006 at 21:59 UTC 2c3cff49301c44767c72391cb5288aa0d10563a9
1 file changed +6 -3
git-cvsserver.perl
+6 -3
@@ -547,12 +547,15 @@ sub req_Argument
547 {
548 my ( $cmd, $data ) = @_;
549
550 - # TODO : Not quite sure how Argument and Argumentx differ, but I assume
551 - # it's for multi-line arguments ... somehow ...
550 + # Argumentx means: append to last Argument (with a newline in front)
551
552 $log->debug("$cmd : $data");
553
555 - push @{$state->{arguments}}, $data;
554 + if ( $cmd eq 'Argumentx') {
555 + ${$state->{arguments}}[$#{$state->{arguments}}] .= "\n" . $data;
556 + } else {
557 + push @{$state->{arguments}}, $data;
558 + }
559 }
560
561 # expand-modules \n