From 6be8da8da3bdf7deb757242e6f7d9f5696250363 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 9 Dec 2018 16:26:22 -0500 Subject: km/magit-show-commit-at-point: Tighten hash regexp The main motivation is to make this work with hexshas surrounded by `. --- lisp/km-magit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 58c8332..4df9d0c 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -71,8 +71,8 @@ argument CHOOSE-PROJECT is non-nil, 2) there is no current project, or 3) an commit object for the hash at point doesn't exist in the current project." (interactive "P") - (if (save-excursion (skip-chars-backward "A-z0-9") - (looking-at "\\b[A-z0-9]\\{4,40\\}\\b")) + (if (save-excursion (skip-chars-backward "a-f0-9") + (looking-at "\\b[a-f0-9]\\{4,40\\}\\b")) (let* ((hash (match-string-no-properties 0)) (project (and (or choose-project -- cgit v1.2.3