Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
cvsserver: Add cvs co -c support
author
Lars Noschinski
<lars@public.noschinski.de>
Thu, 17 Jul 2008 17:00:29 +0000
(19:00 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 19 Jul 2008 18:17:43 +0000
(11:17 -0700)
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>
git-cvsserver.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
b20171e
)
diff --git
a/git-cvsserver.perl
b/git-cvsserver.perl
index 23b8ed398f7cb4588e5fe2613ded4514d46e8c84..b0a805c688f59af29e1f25b514d73f3991285dee 100755
(executable)
--- 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;