diff --git a/lib/capistrano/git.rb b/lib/capistrano/git.rb index 71b4317e..305cbc4b 100644 --- a/lib/capistrano/git.rb +++ b/lib/capistrano/git.rb @@ -18,7 +18,7 @@ class Capistrano::Git < Capistrano::SCM end def check - git :'ls-remote -h', repo_url + git :'ls-remote --heads', repo_url end def clone diff --git a/spec/lib/capistrano/git_spec.rb b/spec/lib/capistrano/git_spec.rb index 60d8aa42..0876038b 100644 --- a/spec/lib/capistrano/git_spec.rb +++ b/spec/lib/capistrano/git_spec.rb @@ -31,7 +31,7 @@ module Capistrano describe "#check" do it "should test the repo url" do context.expects(:repo_url).returns(:url) - context.expects(:execute).with(:git, :'ls-remote -h', :url).returns(true) + context.expects(:execute).with(:git, :'ls-remote --heads', :url).returns(true) subject.check end