diff options
author | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-25 12:19:56 +0200 |
---|---|---|
committer | Agis Anastasopoulos <agis.anast@gmail.com> | 2015-10-25 12:19:56 +0200 |
commit | 80cf688bab7ee3ced619c12ac5e2d6dfb0c78c38 (patch) | |
tree | 8e1e29738a728d7184574517b1fec027f2cabcc1 /lib/bundler/source/git.rb | |
parent | 0c459df96d11a917a37fb23262099700abed261f (diff) | |
download | bundler-show-git-rev.tar.gz |
Include revision hash in Source::Git#to_sshow-git-rev
This effectively changes the output of commands that use Source::Git#to_s
(ie. `bundle install`). For example:
Using rack 1.0.0 from git@github.com:rack/rack.git (at master@574b147)
Closes #3433.
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index c18341d17e..3a75299ff8 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -65,7 +65,14 @@ module Bundler else ref end - "#{uri} (at #{at})" + + rev = begin + "@#{shortref_for_display(revision)}" + rescue GitError + nil + end + + "#{uri} (at #{at}#{rev})" end def name |