Skip to content

Commit

Permalink
Fix for rubygems#7547
Browse files Browse the repository at this point in the history
Remove depth arguments when git responds with error indicating it can't handle depth arguments
  • Loading branch information
llenk committed May 8, 2024
1 parent c1933bf commit e997ffe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bundler/lib/bundler/source/git/git_proxy.rb
Expand Up @@ -181,6 +181,14 @@ def clone_needs_extra_fetch?

if err.include?("Could not find remote branch")
raise MissingGitRevisionError.new(command_with_no_credentials, nil, explicit_ref, credential_filtered_uri)
elsif err.include?("dumb http transport does not support shallow capabilities")
idx = command.index("--depth")
if idx
command.delete_at(idx)
command.delete_at(idx)
err += "Retrying without --depth argument."
end
raise GitCommandError.new(command_with_no_credentials, path, err)
else
raise GitCommandError.new(command_with_no_credentials, path, err)
end
Expand Down

0 comments on commit e997ffe

Please sign in to comment.