If you have a local tracking branch, e.g. called 'test', and the
remote branch name is different than test (e.g. 'somwhere/master')
then the commands for retrieving the unpulled and unpushed commits was
calling "git log test..somwehere/test" which may or may not exist.
---
magit.el | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/magit.el b/magit.el
index 73d4259..00eb746 100644
--- a/magit.el
+++ b/magit.el
@@ -2084,6 +2084,12 @@ string which will represent the log line.")
"log" "--pretty=format:* %H %s"
(format "%s..HEAD" (magit-get-svn-ref use-cache))))
+(defun magit-remote-branch-for (local-branch)
+ (let ((merge (magit-get "branch" local-branch "merge")))
+ (save-match-data
+ (if (and merge (string-match "^refs/heads/\\(.+\\)" merge))
+ (match-string 1 merge)))))
+
;;; Status
(defun magit-remote-string (remote svn-info)
@@ -2099,6 +2105,7 @@ string which will represent the log line.")
(magit-with-section 'status nil
(let* ((branch (magit-get-current-branch))
(remote (and branch (magit-get "branch" branch "remote")))
+ (remote-branch (or (and branch (magit-remote-branch-for branch))
branch))
(svn-info (magit-get-svn-ref-info))
(remote-string (magit-remote-string remote svn-info))
(head (magit-git-string
@@ -2129,7 +2136,7 @@ string which will represent the log line.")
(magit-insert-pending-changes)
(magit-insert-pending-commits)
(when remote
- (magit-insert-unpulled-commits remote branch))
+ (magit-insert-unpulled-commits remote remote-branch))
(when svn-info
(magit-insert-unpulled-svn-commits t))
(let ((staged (or no-commit (magit-anything-staged-p))))
@@ -2138,7 +2145,7 @@ string which will represent the log line.")
(if staged
(magit-insert-staged-changes no-commit)))
(when remote
- (magit-insert-unpushed-commits remote branch))
+ (magit-insert-unpushed-commits remote remote-branch))
(when svn-info
(magit-insert-unpushed-svn-commits t))))))
--
1.6.3.3
To unsubscribe from this group, send email to magit+unsubscribegooglegroups.com
or reply to this email with the words "REMOVE ME" as the subject.