mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
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>
This commit is contained in:
parent
b20171ebf7
commit
89a9167fac
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user