Merge branch 'github-merge-requests'
This commit is contained in:
commit
bd01310032
1 changed files with 17 additions and 7 deletions
24
magit.el
24
magit.el
|
@ -2441,17 +2441,23 @@ insert a line to tell how to insert more of them"
|
||||||
(or magit-marked-commit
|
(or magit-marked-commit
|
||||||
(error "No commit marked")))
|
(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)
|
(defun magit-insert-unpulled-commits (remote branch)
|
||||||
(magit-git-section 'unpulled
|
(magit-git-section 'unpulled
|
||||||
"Unpulled commits:" 'magit-wash-log
|
"Unpulled commits:" 'magit-wash-log
|
||||||
"log" "--pretty=format:* %H %s"
|
"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)
|
(defun magit-insert-unpushed-commits (remote branch)
|
||||||
(magit-git-section 'unpushed
|
(magit-git-section 'unpushed
|
||||||
"Unpushed commits:" 'magit-wash-log
|
"Unpushed commits:" 'magit-wash-log
|
||||||
"log" "--pretty=format:* %H %s"
|
"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)
|
(defun magit-insert-unpulled-svn-commits (&optional use-cache)
|
||||||
(magit-git-section 'svn-unpulled
|
(magit-git-section 'svn-unpulled
|
||||||
|
@ -2474,10 +2480,14 @@ insert a line to tell how to insert more of them"
|
||||||
|
|
||||||
;;; Status
|
;;; Status
|
||||||
|
|
||||||
(defun magit-remote-string (remote svn-info)
|
(defun magit-remote-string (remote remote-branch svn-info)
|
||||||
(if remote
|
(cond
|
||||||
(concat remote " " (magit-get "remote" remote "url"))
|
((string= "." remote)
|
||||||
(when svn-info
|
(format "branch %s"
|
||||||
|
(propertize remote-branch 'face 'magit-branch)))
|
||||||
|
(remote
|
||||||
|
(concat remote " " (magit-get "remote" remote "url")))
|
||||||
|
(svn-info
|
||||||
(concat (cdr (assoc 'url svn-info))
|
(concat (cdr (assoc 'url svn-info))
|
||||||
" @ "
|
" @ "
|
||||||
(cdr (assoc 'revision svn-info))))))
|
(cdr (assoc 'revision svn-info))))))
|
||||||
|
@ -2489,7 +2499,7 @@ insert a line to tell how to insert more of them"
|
||||||
(remote (and branch (magit-get "branch" branch "remote")))
|
(remote (and branch (magit-get "branch" branch "remote")))
|
||||||
(remote-branch (or (and branch (magit-remote-branch-for branch)) branch))
|
(remote-branch (or (and branch (magit-remote-branch-for branch)) branch))
|
||||||
(svn-info (magit-get-svn-ref-info))
|
(svn-info (magit-get-svn-ref-info))
|
||||||
(remote-string (magit-remote-string remote svn-info))
|
(remote-string (magit-remote-string remote remote-branch svn-info))
|
||||||
(head (magit-git-string
|
(head (magit-git-string
|
||||||
"log" "--max-count=1" "--abbrev-commit" "--pretty=oneline"))
|
"log" "--max-count=1" "--abbrev-commit" "--pretty=oneline"))
|
||||||
(no-commit (not head)))
|
(no-commit (not head)))
|
||||||
|
|
Loading…
Reference in a new issue