X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-cvsserver.perl;h=3c588c9d6439f35035f10cefd72b71933261d2a4;hb=1025fe51bf540bc4c63bce2553a43b1c753e1c40;hp=344b2f398ba4da74db78a894d18a4eda43b11872;hpb=7172aabb4b5a6d0345b3c57f2f7ededece81b9b7;p=git.git diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 344b2f39..3c588c9d 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -630,6 +630,26 @@ sub req_update argsplit("update"); + # + # It may just be a client exploring the available heads/modukles + # in that case, list them as top level directories and leave it + # at that. Eclipse uses this technique to offer you a list of + # projects (heads in this case) to checkout. + # + if ($state->{module} eq '') { + print "E cvs update: Updating .\n"; + opendir HEADS, $state->{CVSROOT} . '/refs/heads'; + while (my $head = readdir(HEADS)) { + if (-f $state->{CVSROOT} . '/refs/heads/' . $head) { + print "E cvs update: New directory `$head'\n"; + } + } + closedir HEADS; + print "ok\n"; + return 1; + } + + # Grab a handle to the SQLite db and do any necessary updates my $updater = GITCVS::updater->new($state->{CVSROOT}, $state->{module}, $log);