提交 8c372fb0 编写于 作者: P Philippe Bruhat (BooK) 提交者: Junio C Hamano

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: NPhilippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e9039dd3
...@@ -227,6 +227,7 @@ sub conn { ...@@ -227,6 +227,7 @@ sub conn {
$proxyport = $1; $proxyport = $1;
} }
} }
$repo ||= '/';
# if username is not explicit in CVSROOT, then use current user, as cvs would # if username is not explicit in CVSROOT, then use current user, as cvs would
$user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user; $user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册