summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorMartin Langhoff <martin@catalyst.net.nz>2005-11-02 13:48:22 +1300
committerJunio C Hamano <junkio@cox.net>2005-11-01 16:57:14 -0800
commitd44e8cf0298a794648271cbff2f74a0063a672b3 (patch)
tree804fbd681d434901296742668296c822cd6d21fe /git-cvsimport.perl
parent319f8b3da6858f78282de9483be7b27b4bb1ffba (diff)
downloadgit-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.gz
cvsimport: catch error condition where cvs host disappears
Add error handling for cases where the cvs server goes away unexpectedly. While I don't know why the cvs server is so erratic, we should definitely exit here before committing bogus files. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index bbb83fb71c..e3cad5a1ca 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -337,6 +337,10 @@ sub file {
}
close ($fh);
+ if ($res eq '') {
+ die "Looks like the server has gone away while fetching $fn $rev -- exiting!";
+ }
+
return ($name, $res);
}