Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index 434cf45a48a10739d0ca1af231663fa7ca333f24..771c5c11bdd63e745dc02f4250b84b1306ab2d24 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -4406,6 +4406,8 @@ def CMDpatch(parser, args): |
RunGit(['branch', '-D', options.newbranch], |
stderr=subprocess2.PIPE, error_ok=True) |
RunGit(['new-branch', options.newbranch]) |
+ elif not GetCurrentBranch(): |
+ DieWithError('A branch is required to apply patch. Hint: use -b option.') |
michaelpg
2016/08/18 23:03:46
sweet, didn't know about that option
|
cl = Changelist(auth_config=auth_config, codereview=options.forced_codereview) |