aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorZhiming Wang2016-12-06 15:18:53 -0500
committerZhiming Wang2016-12-06 15:20:04 -0500
commit59f926cfd3da207d53e5ebc168fbff54a36edb6a (patch)
tree1b1548d57d9c0dedea9709c34af5c2ca7e88ca84 /Library
parent0fe532c242d73c73eeb2b87a15a46ec9602685df (diff)
downloadbrew-59f926cfd3da207d53e5ebc168fbff54a36edb6a.tar.bz2
boneyard-formula-pr: checkout last branch when done
Make its behavior more consistent with that of bump-formula-pr.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/boneyard-formula-pr.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
index b4cc02435..3066d2ee6 100644
--- a/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/boneyard-formula-pr.rb
@@ -88,6 +88,8 @@ module Homebrew
ohai "git push $HUB_REMOTE #{branch}:#{branch}"
ohai "hub pull-request -m $'#{formula.name}: migrate to boneyard\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
end
+
+ ohai "git checkout -"
else
cd formula.tap.path
safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master"
@@ -108,6 +110,8 @@ module Homebrew
EOS
pr_url = Utils.popen_read("hub", "pull-request", "-m", pr_message).chomp
end
+
+ safe_system "git", "checkout", "-"
end
if ARGV.dry_run?
@@ -128,6 +132,8 @@ module Homebrew
ohai "git push $HUB_REMOTE #{branch}:#{branch}"
ohai "hub pull-request --browse -m $'#{formula.name}: migrate from #{formula.tap.repo}\\n\\nGoes together with $PR_URL\\n\\nCreated with `brew boneyard-formula-pr`#{reason}.'"
end
+
+ ohai "git checkout -"
else
cd boneyard_tap.formula_dir
safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master"
@@ -153,6 +159,8 @@ module Homebrew
Created with `brew boneyard-formula-pr`#{reason}.
EOS
end
+
+ safe_system "git", "checkout", "-"
end
end
end