branch: elpa/magit
commit 9b83b1e3175ce89d48cfe0d83c79cf5c677cab52
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-split-range: Cosmetics
---
lisp/magit-git.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 19b5b4485f0..692a8a3f519 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2511,14 +2511,13 @@ and this option only controls what face is used.")
"\\([^.][^ \t]*\\)?\\'")) ; revB
(defun magit-split-range (range)
- (pcase-let ((`(,beg ,end ,sep) (magit--split-range-raw range)))
- (and sep
- (let ((beg (or beg "HEAD"))
+ (pcase-let* ((`(,beg ,end ,sep) (magit--split-range-raw range))
+ (beg (or beg "HEAD"))
(end (or end "HEAD")))
- (if (string-equal sep "...")
- (and-let* ((base (magit-git-string "merge-base" beg end)))
- (cons base end))
- (cons beg end))))))
+ (pcase sep
+ (".." (cons beg end))
+ ("..." (and-let* ((base (magit-git-string "merge-base" beg end)))
+ (cons base end))))))
(defun magit--split-range-raw (range)
(and (string-match magit-range-re range)