Skip to content

Commit

Permalink
[rubygems/rubygems] move git clone depth error handling to else branch
Browse files Browse the repository at this point in the history
  • Loading branch information
llenk authored and matzbot committed May 22, 2024
1 parent ec9de0c commit 5b9b6b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bundler/source/git/git_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ 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")
else
idx = command.index("--depth")
if idx
command.delete_at(idx)
command.delete_at(idx)
command_with_no_credentials = check_allowed(command)

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
end
end
Expand Down

0 comments on commit 5b9b6b4

Please sign in to comment.