From 92350241310905a01bf0e2229b1a20cb93940d95 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Sat, 22 Jul 2023 22:41:51 +0100 Subject: [PATCH] dev-cmd/pr-pull: fix branch warning conditions --- Library/Homebrew/dev-cmd/pr-pull.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index adf2eb61d1..479167bdc4 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -432,7 +432,7 @@ module Homebrew odie "Not a GitHub pull request: #{arg}" unless pr git_repo = tap.git_repo - if !git_repo.default_origin_branch? || args.branch_okay? || args.clean? + if !git_repo.default_origin_branch? && !args.branch_okay? && !args.no_commit? && !args.no_cherry_pick? opoo "Current branch is #{git_repo.branch_name}: do you need to pull inside #{git_repo.origin_branch_name}?" end