From e58b3c379ce2f57dc52c66f803c413eb2ad10723 Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Mon, 5 Jul 2010 23:53:22 +0100 Subject: [PATCH] Added `magit-remote-branch-name'. Fixed unpushed args. --- magit.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 83b357dc..acc2af34 100644 --- a/magit.el +++ b/magit.el @@ -2518,6 +2518,12 @@ 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))) + (magit-define-inserter unpulled-commits (remote branch) (when remote (magit-git-section 'unpulled @@ -2531,7 +2537,7 @@ insert a line to tell how to insert more of them" (magit-git-section 'unpushed "Unpushed commits:" 'magit-wash-log "log" "--pretty=format:* %H %s" - (format "HEAD..%s" + (format "%s..HEAD" (magit-remote-branch-name remote branch))))) (defun magit-remote-branch-for (local-branch)