diff options
author | Philippe Bruhat (BooK) <book@cpan.org> | 2008-06-10 14:32:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-10 22:24:01 -0700 |
commit | 8c372fb01dcd9da5e0e538943cc173941c03ef2d (patch) | |
tree | 7bebe04ef5d7a76999bf5aae5c3168c8f1b39eb8 /git-cvsimport.perl | |
parent | e9039dd35194b7c1cf4ecd479928638166b8458f (diff) | |
download | git-8c372fb01dcd9da5e0e538943cc173941c03ef2d.tar.gz git-8c372fb01dcd9da5e0e538943cc173941c03ef2d.tar.xz |
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>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-x | git-cvsimport.perl | 1 |
1 files changed, 1 insertions, 0 deletions
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; |