[PATCH] git-cvsimport: do not fail when CVSROOT is /

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: <gitster@...>, Philippe Bruhat (BooK) <book@...>
Date: Tuesday, June 10, 2008 - 8:32 am

For CVS repositories with unusual CVSROOT, git-cvsimport would fail:

    $ git-cvsimport -v -C foo -d :pserver:anon:@cvs.example.com:/ foo
    AuthReply: error 0 : no such repository

This patch ensures that the path is never empty, but at least '/'.

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
---
 git-cvsimport.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 5a02550..cacbfc0 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -227,6 +227,7 @@ sub conn {
 				$proxyport = $1;
 			}
 		}
+		$repo ||= '/';
 
 		# if username is not explicit in CVSROOT, then use current user, as cvs would
 		$user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user;
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] git-cvsimport: do not fail when CVSROOT is /, Philippe Bruhat (BooK), (Tue Jun 10, 8:32 am)