From d44e8cf0298a794648271cbff2f74a0063a672b3 Mon Sep 17 00:00:00 2001 From: Martin Langhoff Date: Wed, 2 Nov 2005 13:48:22 +1300 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-cvsimport.perl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index bbb83fb71..e3cad5a1c 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); } -- 2.30.2