Skip to content

Commit 2c3cff4

Browse files
dschoJunio C Hamano
authored andcommitted
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>
1 parent a1dad60 commit 2c3cff4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

git-cvsserver.perl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,15 @@ sub req_Argument
547547
{
548548
my ( $cmd, $data ) = @_;
549549

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

553552
$log->debug("$cmd : $data");
554553

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+
}
556559
}
557560

558561
# expand-modules \n

0 commit comments

Comments
 (0)