diff options
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index da48d64439..b3e218e390 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -61,8 +61,12 @@ module Bundler def to_s at = if local? path - elsif options["ref"] - shortref_for_display(options["ref"]) + elsif user_ref = options["ref"] + if ref =~ /\A[a-z0-9]{4,}\z/i + shortref_for_display(user_ref) + else + user_ref + end else ref end |