aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-git.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2026-01-21 09:18:00 +0100
committerJonas Bernoulli <jonas@bernoul.li>2026-01-21 09:18:00 +0100
commitdbe18e790e4967b92da7712479938dd159dcaad1 (patch)
treeed19d1316711bcde2a2e8f3584b21b5298a59ec4 /lisp/magit-git.el
parentc0da395e34da056a3c8f065de76cf1b9498394fb (diff)
magit-rev-head-p: Again assume that REV actually is a revision
We stopped doing that in [1: 5c2ca6e2b2] for the benefit of its only caller, which doesn't need that anymore since the previous commit. 1: 2015-07-07 5c2ca6e2b2af877d715869f3fd265f706ab35b45 magit-rev-head-p: deal with invalid input
Diffstat (limited to 'lisp/magit-git.el')
-rw-r--r--lisp/magit-git.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index c51ab15..e792f3c 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1479,10 +1479,9 @@ However, if REV is nil or has the form \":/TEXT\", return REV itself."
(magit-git-success "merge-base" "--is-ancestor" a b))
(defun magit-rev-head-p (rev)
+ "Return t if REV can be dereferences as the `HEAD' commit."
(or (equal rev "HEAD")
- (and rev
- (not (string-search ".." rev))
- (magit-rev-eq rev "HEAD"))))
+ (magit-rev-eq rev "HEAD")))
(defun magit-rev-author-p (rev)
"Return t if the user is the author of REV.