Commit 3aec1c74 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-read-remote-branch: fix sanity check

If REMOTE is non-nil, then the value has the form "BRANCH", not
"REMOTE/BRANCH".  Do not throw an error if the user selects a
branch whose name that does not happen to contain a slash.
parent 1522170d
......@@ -1225,7 +1225,7 @@ Return a list of two integers: (A>B B>A)."
(magit-list-remotes))))
(magit-list-remote-branch-names remote t))
nil require-match nil 'magit-revision-history default)))
(if (string-match "\\`\\([^/]+\\)/\\(.+\\)" choice)
(if (or remote (string-match "\\`\\([^/]+\\)/\\(.+\\)" choice))
choice
(user-error "`%s' doesn't have the form REMOTE/BRANCH" choice))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment