summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 19:59:08 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-26 20:03:01 (GMT)
commit2c3cff49301c44767c72391cb5288aa0d10563a9 (patch)
tree3994ecbcada1eed78aff74852b9f5a8ef33304cb /git-cvsserver.perl
parenta1dad607fa5227c844c0f8ab180b811d23792c02 (diff)
downloadgit-2c3cff49301c44767c72391cb5288aa0d10563a9.zip
git-2c3cff49301c44767c72391cb5288aa0d10563a9.tar.gz
git-2c3cff49301c44767c72391cb5288aa0d10563a9.tar.bz2
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>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 0bbd871..5b73837 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -547,12 +547,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