Use just the branch name for unpushed/unpulled when the remote is "."
When the remote is "." it signifies that the current branch is tracking another local branch, not a branch in one of the remotes. So, in that case, use just the branch name as the upstream branch instead of the "remote/branch" naming scheme.
This commit is contained in:
parent
b65979510e
commit
809a5cb81c
1 changed files with 8 additions and 2 deletions
10
magit.el
10
magit.el
|
@ -2441,17 +2441,23 @@ insert a line to tell how to insert more of them"
|
|||
(or magit-marked-commit
|
||||
(error "No commit marked")))
|
||||
|
||||
(defun magit-remote-branch-name (remote branch)
|
||||
"Get the name of the branch BRANCH on remote REMOTE"
|
||||
(if (string= remote ".") branch (concat remote "/" branch)))
|
||||
|
||||
(defun magit-insert-unpulled-commits (remote branch)
|
||||
(magit-git-section 'unpulled
|
||||
"Unpulled commits:" 'magit-wash-log
|
||||
"log" "--pretty=format:* %H %s"
|
||||
(format "HEAD..%s/%s" remote branch)))
|
||||
(format "HEAD..%s"
|
||||
(magit-remote-branch-name remote branch))))
|
||||
|
||||
(defun magit-insert-unpushed-commits (remote branch)
|
||||
(magit-git-section 'unpushed
|
||||
"Unpushed commits:" 'magit-wash-log
|
||||
"log" "--pretty=format:* %H %s"
|
||||
(format "%s/%s..HEAD" remote branch)))
|
||||
(format "%s..HEAD"
|
||||
(magit-remote-branch-name remote branch))))
|
||||
|
||||
(defun magit-insert-unpulled-svn-commits (&optional use-cache)
|
||||
(magit-git-section 'svn-unpulled
|
||||
|
|
Loading…
Reference in a new issue