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) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Bruhat (BooK) committed
Jun 10, 2008 at 14:32 UTC
8c372fb01dcd9da5e0e538943cc173941c03ef2d
1 file changed
+1
git-cvsimport.perl
+1
@@ -227,6 +227,7 @@ sub conn {
227
$proxyport = $1;
228
}
229
}
230
+ $repo ||= '/';
231
232
# if username is not explicit in CVSROOT, then use current user, as cvs would
233
$user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user;