If the ref option is a specific commit SHA, we can check to see if
it's already fetched locally. If it is, then we don't need to re-fetch
it from the remote.
The ref option might not be a commit SHA, so we're using the #commit
method which returns the full SHA if it's a commit ref, or the locked
revision, or nil.
This is a small improvement that will make bundle update slightly
faster in cases for git-sourced gems pinned to a specific commit.
[rubygems/rubygems] Cache commit SHA ref revisions
If the
ref
option is a specific commit SHA, we can check to see ifit's already fetched locally. If it is, then we don't need to re-fetch
it from the remote.
The
ref
option might not be a commit SHA, so we're using the#commit
method which returns the full SHA if it's a commit ref, or the locked
revision, or nil.
This is a small improvement that will make
bundle update
slightlyfaster in cases for git-sourced gems pinned to a specific commit.
https://github.com/rubygems/rubygems/commit/f434c2e66c