summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-12-24 03:08:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-24 06:33:07 (GMT)
commit3a969ef1d67e3b3a26c36cfbe94f6dba05d6dc69 (patch)
treef2e0f86983b560b52f9c1b0a68e9b1c2afb6e1e1 /git-cvsimport.perl
parentba4c32bdd506841c3f73cdfce5e9fb6760afd02c (diff)
downloadgit-3a969ef1d67e3b3a26c36cfbe94f6dba05d6dc69.zip
git-3a969ef1d67e3b3a26c36cfbe94f6dba05d6dc69.tar.gz
git-3a969ef1d67e3b3a26c36cfbe94f6dba05d6dc69.tar.bz2
cvsimport: die on cvsps errors
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>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 1fa9a22..6d8ff93 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -632,6 +632,7 @@ unless ($opt_P) {
print $cvspsfh $_;
}
close CVSPS;
+ $? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
close $cvspsfh;
} else {
$cvspsfile = $opt_P;