Merge pull request #6554 from mitchellh/b-heroku-branch
push/heroku: use correct current branch [GH-6123]
This commit is contained in:
commit
97021ceedd
|
@ -69,7 +69,8 @@ module VagrantPlugins
|
||||||
result = execute!("git",
|
result = execute!("git",
|
||||||
"--git-dir", git_dir(path),
|
"--git-dir", git_dir(path),
|
||||||
"--work-tree", path,
|
"--work-tree", path,
|
||||||
"branch",
|
"symbolic-ref",
|
||||||
|
"HEAD",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Returns something like "* master"
|
# Returns something like "* master"
|
||||||
|
|
|
@ -252,22 +252,6 @@ describe VagrantPlugins::HerokuPush::Push do
|
||||||
|
|
||||||
let(:branch) { subject.git_branch("/path") }
|
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
|
context "when the branch is not prefixed" do
|
||||||
let(:stdout) { "bacon" }
|
let(:stdout) { "bacon" }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue