When a gem is referenced from a git repo:
gem 'acts_as_audited', :git => 'git://github.com/dlkinney/acts_as_audited.git', :branch => 'rails3'
and the git repo has changed since the last call to bundle install, then the subsequent call to bundle install fails when zsh is used:
⚡ bundle install
zsh:1: no matches found: refs/heads/*:refs/heads/*
An error has occurred in git when running `git fetch --force --quiet --tags "git://github.com/dlkinney/acts_as_audited.git" refs/heads/*:refs/heads/*`. Cannot complete bundling.
This occurs when bundle attempts to fetch the latest changes into its cached git repo. The failure is due to the fact that zsh will attempt to do file expansion on the git refspec: refs/heads/:refs/heads/ and trigger an error rather than pass it straight through to git.
This can be worked around by setting the zsh option NO_NOMATCH:
However, to avoid confusion by naive zsh users (as I myself was!), better to avoid the problem by quoting the refspec.
A pull request to fix this issue is forthcoming.
Is this not a duplicate of issue #941 ?
My bad -- I missed that one. Yes, it's the same. And the pull request I've created (attached to #1025) would also fix #941.
Apologies, I've not used Github's issue/pull-request system much. If I could delete #1024 and #1025, moving the pull request to #941 I'd do so. If anyone reading this can do so, please feel free.