Auto merge of #3965 - agis-:issue-3879, r=indirect
Auto merge of #3965 - agis-:issue-3879, r=indirect

Show friendly errors when ref is not found..

Before:

    $ bundle install
    Fetching git://github.com/agis-/some_gem.git
    fatal: ambiguous argument 'FOO': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git  [...] -- [...]'
    Git error: command `git rev-parse WRONG` in directory /cache/path
    has failed.
    Ref 'foo' was not found. Perhaps you mispelled it?
    If this error persists you could try removing the cache directory
    # ...

After:

    $ bundle install
    Fetching git://github.com/agis-/some_gem.git
    fatal: Needed a single revision
    Git error: command `git rev-parse --verify WRONG` in directory /cache/path
    has failed.
    Ref 'foo' was not found. Perhaps you mispelled it?
    If this error persists you could try removing the cache directory
    # ...

Fixes #3879.

agis-/bundler,agis-/bundler