git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cvsserver: Add cvs co -c support

From
Lars Noschinski <lars@public.noschinski.de>
Date
Jul 17, 2008, 17:00 UTC
Message-ID
<1216314030-10887-5-git-send-email-lars@public.noschinski.de>
In-Reply-To
<1216314030-10887-4-git-send-email-lars@public.noschinski.de>

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>
---
 git-cvsserver.perl |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 66aebf8..064952e 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;
-- 
1.5.6.2
Previous: Lars NoschinskiNext: Lars Noschinski
Message 5 of 6 in “Some cvs related fixes and enhancements v2”
  1. Lars NoschinskiJul 17, 2008
  2. Testsuite: Unset CVS_SERVERLars Noschinski, Jul 17, 2008
  3. cvsserver: Add support for packed refsLars Noschinski, Jul 17, 2008
  4. cvsserver: Add testsuite for packed refsLars Noschinski, Jul 17, 2008
  5. cvsserver: Add cvs co -c supportLars Noschinski, Jul 17, 2008
  6. testsuite for cvs co -cLars Noschinski, Jul 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.