summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba4c32b)
raw | patch | inline | side by side (parent: ba4c32b)
author | Jeff King <peff@peff.net> | |
Mon, 24 Dec 2007 03:08:19 +0000 (22:08 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 24 Dec 2007 06:33:07 +0000 (22:33 -0800) |
We were not previously checking the exit status of cvsps at
all. If it exited before producing any useful output, we
ended up with an empty import, which caused a spew of
confusing error messages from other parts of git:
$ git-cvsimport foo
Initialized empty Git repository in ...
some error from cvsps
fatal: refs/heads/origin: not a valid SHA1
fatal: master: not a valid SHA1
warning: You appear to be on a branch yet to be born.
warning: Forcing checkout of HEAD.
fatal: just how do you expect me to merge 0 trees?
checkout failed: 256
Now we get:
$ git-cvsimport foo
Initialized empty Git repository in ...
some error from cvsps
git-cvsimport: fatal: cvsps reported error
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
all. If it exited before producing any useful output, we
ended up with an empty import, which caused a spew of
confusing error messages from other parts of git:
$ git-cvsimport foo
Initialized empty Git repository in ...
some error from cvsps
fatal: refs/heads/origin: not a valid SHA1
fatal: master: not a valid SHA1
warning: You appear to be on a branch yet to be born.
warning: Forcing checkout of HEAD.
fatal: just how do you expect me to merge 0 trees?
checkout failed: 256
Now we get:
$ git-cvsimport foo
Initialized empty Git repository in ...
some error from cvsps
git-cvsimport: fatal: cvsps reported error
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsimport.perl | patch | blob | history |
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1fa9a2237637f8b463355f2fca9c1b590fbe0e63..6d8ff93f5f7bf05f2e94b4e1c522423c8430739c 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
print $cvspsfh $_;
}
close CVSPS;
+ $? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
close $cvspsfh;
} else {
$cvspsfile = $opt_P;