aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-05-13 18:32:37 +0800
committerXu Cheng2015-05-13 18:32:37 +0800
commit68a654dd267ff6f0ca7ee5300fccddddaabe803a (patch)
tree39adbe0ce25fc49b30e5682c021bde4cb5a8d980
parent1600658fcc6f08ef4e03de93b6a115e779a0d442 (diff)
downloadbrew-68a654dd267ff6f0ca7ee5300fccddddaabe803a.tar.bz2
pull: warning if we are not in master
Closes Homebrew/homebrew#39708. Signed-off-by: Xu Cheng <xucheng@me.com>
-rw-r--r--Library/Homebrew/cmd/pull.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 5d876fbb7..9eeabe135 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -94,6 +94,10 @@ module Homebrew
revision = `git rev-parse --short HEAD`.strip
branch = `git symbolic-ref --short HEAD`.strip
+ unless branch == "master"
+ opoo "Current branch is #{branch}: do you need to pull inside master?"
+ end
+
pull_url url
changed_formulae = []