Have `magit--branch-name-from-line' pull out the branch name.
This commit is contained in:
parent
79d7f46502
commit
b261669efe
1 changed files with 2 additions and 2 deletions
4
magit.el
4
magit.el
|
@ -3569,8 +3569,8 @@ Prefix arg means justify as well."
|
||||||
"Extract the branch name from one line of 'git branch' output.
|
"Extract the branch name from one line of 'git branch' output.
|
||||||
Will remove the 'remotes/' prefix if it exists."
|
Will remove the 'remotes/' prefix if it exists."
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(if (string-match "^[[:blank:]]*\\*?[[:blank:]]+\\(remotes/\\)?\\([^[:blank:]]+\\)[[:blank:]]" line)
|
(if (string-match " \\([^ ]+\\)$" line)
|
||||||
(match-string 2 line))))
|
(match-string 1 line))))
|
||||||
|
|
||||||
(defun magit--branch-name-at-point ()
|
(defun magit--branch-name-at-point ()
|
||||||
"Get the branch name in the line at point."
|
"Get the branch name in the line at point."
|
||||||
|
|
Loading…
Reference in a new issue