summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Bruhat (BooK) <book@cpan.org>2008-06-10 14:32:06 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-10 22:24:01 -0700
commit8c372fb01dcd9da5e0e538943cc173941c03ef2d (patch)
tree7bebe04ef5d7a76999bf5aae5c3168c8f1b39eb8
parente9039dd35194b7c1cf4ecd479928638166b8458f (diff)
downloadgit-8c372fb01dcd9da5e0e538943cc173941c03ef2d.tar.gz
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>
-rwxr-xr-xgit-cvsimport.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 5a0255052c..cacbfc0259 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;