From: Martin Langhoff Date: Tue, 9 Jan 2007 02:10:41 +0000 (+1300) Subject: cvsserver: fix revision number during file adds X-Git-Tag: v1.5.0-rc1~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3486595bf1671cabb6fa22d276db2907eefbf9b6;p=git.git cvsserver: fix revision number during file adds With this patch, cvs add / cvs commit echoes back to the client the correct file version (1.1) so that the file in the checkout is recognised as up-to-date. Signed-off-by: Martin Langhoff Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index eb98fa085..a33a876ff 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -1181,12 +1181,15 @@ sub req_ci $filename = filecleanup($filename); my $meta = $updater->getmeta($filename); + unless (defined $meta->{revision}) { + $meta->{revision} = 1; + } my ( $filepart, $dirpart ) = filenamesplit($filename, 1); $log->debug("Checked-in $dirpart : $filename"); - if ( $meta->{filehash} eq "deleted" ) + if ( defined $meta->{filehash} && $meta->{filehash} eq "deleted" ) { print "Remove-entry $dirpart\n"; print "$filename\n";