Skip to content

Commit

Permalink
Merge 84f4f02 into ee61afb
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek authored Dec 3, 2018
2 parents ee61afb + 84f4f02 commit 6bab121
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/commands/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const command = {

module.exports = command;

// See: https://github.com/cksource/mgit2/issues/87
// See: #87 and #92.
function isRemoteHungUpError( error ) {
if ( typeof error != 'string' ) {
error = error.toString();
Expand All @@ -102,13 +102,7 @@ function isRemoteHungUpError( error ) {
.filter( message => message.startsWith( 'fatal:' ) )
.map( message => message.trim() );

if ( fatalErrors.length !== 3 ) {
return false;
}

return fatalErrors[ 0 ] == 'fatal: The remote end hung up unexpectedly' &&
fatalErrors[ 1 ] == 'fatal: early EOF' &&
fatalErrors[ 2 ] == 'fatal: index-pack failed';
return fatalErrors[ 0 ] && fatalErrors[ 0 ].match( /fatal: the remote end hung up unexpectedly/i );
}

function delay( ms ) {
Expand Down

0 comments on commit 6bab121

Please sign in to comment.