summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorLibravatar Martin Langhoff <martin@catalyst.net.nz>2005-11-02 13:48:22 +1300
committerLibravatar Junio C Hamano <junkio@cox.net>2005-11-01 16:57:14 -0800
commitd44e8cf0298a794648271cbff2f74a0063a672b3 (patch)
tree804fbd681d434901296742668296c822cd6d21fe /git-cvsimport.perl
parentDo not install backward compatibility links anymore. (diff)
downloadtgif-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.xz
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);
}