Merge pull request #6554 from mitchellh/b-heroku-branch

push/heroku: use correct current branch [GH-6123]
This commit is contained in:
Mitchell Hashimoto 2015-11-19 11:22:06 -08:00
commit 97021ceedd
2 changed files with 2 additions and 17 deletions

View File

@ -69,7 +69,8 @@ module VagrantPlugins
result = execute!("git",
"--git-dir", git_dir(path),
"--work-tree", path,
"branch",
"symbolic-ref",
"HEAD",
)
# Returns something like "* master"

View File

@ -252,22 +252,6 @@ describe VagrantPlugins::HerokuPush::Push do
let(:branch) { subject.git_branch("/path") }
context "when the branch is prefixed with a star" do
let(:stdout) { "*bacon" }
it "returns the correct name" do
expect(branch).to eq("bacon")
end
end
context "when the branch is prefixed with a star space" do
let(:stdout) { "* bacon" }
it "returns the correct name" do
expect(branch).to eq("bacon")
end
end
context "when the branch is not prefixed" do
let(:stdout) { "bacon" }