Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Wrong output when using master~3 as ref for git gem #5620

Closed
segiddins opened this issue Apr 26, 2017 · 0 comments
Closed

Wrong output when using master~3 as ref for git gem #5620

segiddins opened this issue Apr 26, 2017 · 0 comments

Comments

@segiddins
Copy link
Member

Note master~@ is missing the 3

Fetching https://github.com/bbatsov/rubocop.git
Fetching gem metadata from https://rubygems.org/..............
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.0.0
Using parallel 1.11.1
Using ast 2.3.0
Using powerpack 0.1.1
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.2.1
Using bundler 1.15.0.pre.2
Using rainbow 2.2.2
Using parser 2.4.0.0
Using rubocop 0.48.1 from https://github.com/bbatsov/rubocop.git (at master~@9d428ed)
Bundle complete! 1 Gemfile dependency, 10 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Environment

Bundler   1.15.0.pre.2
Rubygems  2.6.11
Ruby      2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
GEM_HOME  /Users/segiddins/.gem/ruby/2.4.1
GEM_PATH  /Users/segiddins/.gem/ruby/2.4.1:/Users/segiddins/.rubies/2.4.1/lib/ruby/gems/2.4.0
Git       2.11.0
Platform  x86_64-darwin-16

Bundler settings

gem.test
  Set for the current user (/Users/segiddins/.bundle/config): "rspec"
gem.mit
  Set for the current user (/Users/segiddins/.bundle/config): "true"
gem.coc
  Set for the current user (/Users/segiddins/.bundle/config): "true"
plugins
  Set for the current user (/Users/segiddins/.bundle/config): "true"
allow_offline_install
  Set for the current user (/Users/segiddins/.bundle/config): "true"

Gemfile

Gemfile

gem "rubocop", :git => "https://github.com/bbatsov/rubocop.git", ref: "master~3"

Gemfile.lock

GIT
  remote: https://github.com/bbatsov/rubocop.git
  revision: 9d428edb838ed67eee11fc56fd8feeea0b7f0b11
  ref: master~3
  specs:
    rubocop (0.48.1)
      parallel (~> 1.10)
      parser (>= 2.3.3.1, < 3.0)
      powerpack (~> 0.1)
      rainbow (>= 1.99.1, < 3.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (~> 1.0, >= 1.0.1)

GEM
  remote: https://rubygems.org/
  specs:
    ast (2.3.0)
    parallel (1.11.1)
    parser (2.4.0.0)
      ast (~> 2.2)
    powerpack (0.1.1)
    rainbow (2.2.2)
      rake
    rake (12.0.0)
    ruby-progressbar (1.8.1)
    unicode-display_width (1.2.1)

PLATFORMS
  ruby

DEPENDENCIES
  rubocop!

BUNDLED WITH
   1.15.0.pre.2
bundlerbot added a commit that referenced this issue Apr 30, 2017
[Git] Only shorten refs if they are SHAs

Closes #5620
segiddins pushed a commit that referenced this issue May 1, 2017
[Git] Only shorten refs if they are SHAs

Closes #5620

(cherry picked from commit fea2363)
philipefarias added a commit to dleemoo/rc-images that referenced this issue Jun 12, 2017
Changes since last version used (1.14.6):

== 1.15.1 (2017-06-02)

Bugfixes:

  - `bundle lock --update GEM` will fail gracefully when the gem is not in the lockfile (rubygems/bundler#5693, @segiddins)
  - `bundle init --gemspec` will fail gracefully when the gemspec is invalid (@colby-swandale)
  - `bundle install --force` works when the gemfile contains git gems (rubygems/bundler#5678, @segiddins)
  - `bundle env` will print well-formed markdown when there are no settings (rubygems/bundler#5677, @segiddins)

== 1.15.0 (2017-05-19)

This space intentionally left blank.

== 1.15.0.pre.4 (2017-05-10)

Bugfixes:

  - avoid conflicts when `Gem.finish_resolve` is called after the bundle has been set up (@segiddins)
  - ensure that `Gem::Specification.find_by_name` always returns an object that can have `#to_spec` called on it (rubygems/bundler#5592, @jules2689)

== 1.15.0.pre.3 (2017-04-30)

Bugfixes:

  - avoid redundant blank lines in the readme generated by `bundle gem` (@koic)
  - ensure that `open-uri` is not loaded after `bundle exec` (@segiddins)
  - print a helpful error message when an activated default gem conflicts with
    a gem in the gemfile (@segiddins)
  - only shorten `ref` option for git gems when it is a SHA (rubygems/bundler#5620, @segiddins)

== 1.15.0.pre.2 (2017-04-23)

Bugfixes:

  - ensure pre-existing fit caches are updated from remote sources (rubygems/bundler#5423, @alextaylor000)
  - avoid duplicating specs in the lockfile after updating with the gem uninstalled (rubygems/bundler#5599, @segiddins)
  - ensure git gems have their extensions available at runtime (rubygems/bundler#5594, @jules2689, @segiddins)

== 1.15.0.pre.1 (2017-04-16)

Features:

  - print a notification when a newer version of bundler is available (rubygems/bundler#4683, @segiddins)
  - add man pages for all bundler commands (rubygems/bundler#4988, @feministy)
  - add the `bundle info` command (@fredrb, @colby-swandale)
  - all files created with `bundle gem` comply with the bundler style guide (@zachahn)
  - if installing a gem fails, print out the reason the gem needed to be installed (rubygems/bundler#5078, @segiddins)
  - allow setting `gem.push_key` to set the key used when running `rake release` (@DTrierweiler)
  - print gem versions that are regressing during `bundle update` in yellow (rubygems/bundler#5506, @brchristian)
  - avoid printing extraneous dependencies when the resolver encounters a conflict (@segiddins)
  - add the `bundle issue` command that prints instructions for reporting issues (rubygems/bundler#4871, @jonathanpike)
  - add `--source` and `--group` options to the `bundle inject` command (rubygems/bundler#5452, @Shekharrajak)
  - add the `bundle add` command to add a gem to the gemfile (@denniss)
  - add the `bundle pristine` command to re-install gems from cached `.gem` files (rubygems/bundler#4509, @denniss)
  - add a `--parseable` option for `bundle config` (@JuanitoFatas, @colby-swandale)

Performance:

  - speed up gemfile initialization by storing locked dependencies as a hash (@jules2689)
  - speed up gemfile initialization by making locked dependency comparison lazy, avoiding object allocation (@jules2689)
  - only validate git gems when they are downloaded, instead of every time `Bundler.setup` is run (@segiddins)
  - avoid regenerating the lockfile when nothing has changed (@segiddins)
  - avoid diffing large arrays when no sources in the gemfile have changed (@segiddins)
  - avoid evaluating full gemspecs when running with RubyGems 2.5+ (@segiddins)

Bugfixes:

  - fix cases where `bundle update` would print a resolver conflict instead of updating the selected gems (rubygems/bundler#5031, rubygems/bundler#5095, @segiddins)
  - print out a stack trace after an interrupt when running in debug mode (@segiddins)
  - print out when bundler starts fetching a gem from a remote server (@segiddins)
  - fix `bundle gem` failing when `git` is unavailable (rubygems/bundler#5458, @Shekharrajak, @colby-swandale)
  - suggest the appropriate command to unfreeze a bundle (rubygems/bundler#5009, @denniss)
  - ensure nested calls to `bundle exec` resolve default gems correctly (rubygems/bundler#5500, @segiddins)
  - ensure that a plugin failing to install doesn't uninstall other plugins (@kerrizor, @roseaboveit)
  - ensure `socket` is required before being referenced (rubygems/bundler#5533, @rafaelfranca)
  - allow running `bundle outdated` when gems aren't installed locally (rubygems/bundler#5553, @segiddins)
  - print a helpful error when `bundle exec`ing to a gem that isn't included in the bundle (rubygems/bundler#5487, @segiddins)
  - print an error message when a non-git gem is given a `branch` option (rubygems/bundler#5530, @colby-swandale)
  - allow interrupts to exit the process after gems have been installed (@segiddins)
  - print the underlying error when downloading gem metadata fails (rubygems/bundler#5579, @segiddins)
  - avoid deadlocking when installing with a lockfile that is missing dependencies (rubygems/bundler#5378, rubygems/bundler#5480, rubygems/bundler#5519, rubygems/bundler#5526, rubygems/bundler#5529, rubygems/bundler#5549, rubygems/bundler#5572, @segiddins)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants