From: Philippe Bruhat (BooK) Date: Tue, 10 Jun 2008 12:32:06 +0000 (+0200) Subject: git-cvsimport: do not fail when CVSROOT is / X-Git-Tag: v1.5.6-rc3~29 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8c372fb01dcd9da5e0e538943cc173941c03ef2d;p=git.git git-cvsimport: do not fail when CVSROOT is / 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) Signed-off-by: Junio C Hamano --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 5a0255052..cacbfc025 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;