1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

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>
This commit is contained in:
Philippe Bruhat (BooK) 2008-06-10 14:32:06 +02:00 committed by Junio C Hamano
parent e9039dd351
commit 8c372fb01d

View file

@ -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;