pull: warning if we are not in master

Closes Homebrew/homebrew#39708.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-05-13 18:32:37 +08:00
parent 1600658fcc
commit 68a654dd26

View File

@ -94,6 +94,10 @@ module Homebrew
revision = `git rev-parse --short HEAD`.strip revision = `git rev-parse --short HEAD`.strip
branch = `git symbolic-ref --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 pull_url url
changed_formulae = [] changed_formulae = []