Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information...
commit 89a9167fac209649116a6e1b7a39b4f4c974f86b 1 parent b20171e
Lars 'cebewee' Noschinski noschinl authored gitster committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 git-cvsserver.perl
12 git-cvsserver.perl
View
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.