emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 4db39239db 1/2: magit-thingatpt--git-revision:


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 4db39239db 1/2: magit-thingatpt--git-revision: Fewer false-negatives
Date: Sun, 24 Apr 2022 10:58:15 -0400 (EDT)

branch: elpa/git-commit
commit 4db39239dbbbe4657d8ac4d1b2c3247fa8e46c27
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-thingatpt--git-revision: Fewer false-negatives
    
    Counter [1: f4b6cf2219].
    
    1: 2021-03-11 f4b6cf22198a9cbd543724f8423f14273f3a0e0f
       magit-thingatpt--git-revision: Return fewer false-positives
---
 lisp/magit-git.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index e64cca9358..fbff019a49 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2348,9 +2348,10 @@ and this option only controls what face is used.")
                              (re-search-forward (format "\\=[^%s]*" c) nil 
t))))
                   (bounds-of-thing-at-point 'git-revision))))
              (string (buffer-substring-no-properties (car bounds) (cdr 
bounds))))
-    (and (>= (length string) 7)
-         (string-match-p "[a-z]" string)
-         (magit-commit-p string)
+    (and (or (and (>= (length string) 7)
+                  (string-match-p "[a-z]" string)
+                  (magit-commit-p string))
+             (magit-ref-p string))
          string)))
 
 ;;; Completion



reply via email to

[Prev in Thread] Current Thread [Next in Thread]