summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6be32d4)
raw | patch | inline | side by side (parent: 6be32d4)
author | Martin Langhoff <martin@catalyst.net.nz> | |
Sat, 4 Mar 2006 04:47:22 +0000 (17:47 +1300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 4 Mar 2006 06:28:04 +0000 (22:28 -0800) |
We now have different error messages when the repo is not found vs repo is
not configured to allow gitcvs. Should help users during initial checkouts.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
not configured to allow gitcvs. Should help users during initial checkouts.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 9da27231fbb7edc1b4cdba5d97df10bd010d3866..b45079246a5328c1f69905de84e1128459a63bf8 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
$state->{CVSROOT} = $data;
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";
+ unless (-d $ENV{GIT_DIR} && -e $ENV{GIT_DIR}.'HEAD') {
+ print "E $ENV{GIT_DIR} does not seem to be a valid GIT repository\n";
+ print "E \n";
+ print "error 1 $ENV{GIT_DIR} is not a valid repository\n";
+ return 0;
+ }
- foreach my $line ( `git-var -l` )
+ my @gitvars = `git-var -l`;
+ if ($?) {
+ print "E problems executing git-var on the server -- this is not a git repository or the PATH is not set correcly.\n";
+ print "E \n";
+ print "error 1 - problem executing git-var\n";
+ return 0;
+ }
+ foreach my $line ( @gitvars )
{
next unless ( $line =~ /^(.*?)\.(.*?)=(.*)$/ );
$cfg->{$1}{$2} = $3;