Signed-off-by: Rémi Vanicat <[email protected]>
---
magit.el | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/magit.el b/magit.el
index 396ce2a..d543be5 100644
--- a/magit.el
+++ b/magit.el
@@ -562,7 +562,13 @@ Many Magit faces inherit from this one by default."
(format "%s at %s" things (magit-rev-describe (car range))))))
(defun magit-default-rev ()
- (magit-name-rev (magit-commit-at-point t)))
+ (or (magit-name-rev (magit-commit-at-point t))
+ (let ((branch (magit-guess-branch)))
+ (if branch
+ (if (string-match "^refs/\\(.*\\)" branch)
+ (match-string 1 branch)
+ branch)))))
+
;;; Sections
--
1.7.0.4
--
To unsubscribe, reply using "remove me" as the subject.