threads / discuss / 43478

Patch: Support slashes in branches in git-cvsserver

Subject: Patch: Support slashes in branches in git-cvsserver

## tl;dr

One message between Dec 20, 2006 and Dec 20, 2006.

replies: 0people: 1as markdown or json

Ron Parker· Dec 20, 2006, 20:55 UTC · lore

Here is a little patch to allow git-cvsserver to support fetching from branches with slashes in their names like:

	topic/convert-to-xhtml
>From 1d22e18f46a82eab3fe6d467b2b87fe8203ebacc Mon Sep 17 00:00:00 2001
From: Ron Parker <ron.parker@mobot.org>
Date: Wed, 20 Dec 2006 14:48:31 -0600
Subject: [PATCH] Support slashes in branches in git-cvsserver
---
 git-cvsserver.perl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 2a8447e..418c821 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2087,7 +2087,9 @@ sub new
     die "Database dir '$self->{dbdir}' isn't a directory" unless
( defined($self->{dbdir}) and -d $self->{dbdir} );
 
     $self->{module} = $module;
-    $self->{file} = $self->{dbdir} . "/gitcvs.$module.sqlite";
+    my $mod = $module;
+    $mod =~ s/\//./g;
+    $self->{file} = $self->{dbdir} . "/gitcvs.$mod.sqlite";
 
     $self->{git_path} = $config . "/";
 
-- 
1.4.4.2.g8336

← back to recent threads