aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-git.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/magit-git.el')
-rw-r--r--lisp/magit-git.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index fd55c57..92290c8 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2515,14 +2515,18 @@ and this option only controls what face is used.")
"\\(\\.\\.\\.?\\)" ; range marker
"\\([^.][^ \t]*\\)?\\'")) ; revB
-(defun magit-split-range (range)
+(defun magit-split-range (range &optional abbrev)
(pcase-let* ((`(,beg ,end ,sep) (magit--split-range-raw range))
(beg (or beg "HEAD"))
(end (or end "HEAD")))
+ (when abbrev
+ (setq beg (magit--abbrev-if-hash beg))
+ (setq end (magit--abbrev-if-hash end)))
(pcase sep
(".." (cons beg end))
("..." (and-let* ((base (magit-git-string "merge-base" beg end)))
- (cons base end))))))
+ (cons (if abbrev (magit-rev-abbrev base) base)
+ end))))))
(defun magit--split-range-raw (range)
(and (string-match magit-range-re range)