From: Lars Noschinski Date: Thu, 17 Jul 2008 17:00:29 +0000 (+0200) Subject: cvsserver: Add cvs co -c support X-Git-Tag: v1.6.0-rc0~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=89a9167fac209649116a6e1b7a39b4f4c974f86b;p=git.git cvsserver: Add cvs co -c support Implement cvs checkout's -c option by returning a list of all "modules". This is more useful than displaying a perl warning if -c is given. Signed-off-by: Lars Noschinski Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 23b8ed398..b0a805c68 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -801,6 +801,18 @@ sub req_co argsplit("co"); + # Provide list of modules, if -c was used. + if (exists $state->{opt}{c}) { + my $showref = `git show-ref --heads`; + for my $line (split '\n', $showref) { + if ( $line =~ m% refs/heads/(.*)$% ) { + print "M $1\t$1\n"; + } + } + print "ok\n"; + return 1; + } + my $module = $state->{args}[0]; $state->{module} = $module; my $checkout_path = $module;