branch: externals/agitate commit 0b808198202f6bd09d64ec08dc83d3d0f0897dbe Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Refine regexp for git hash extraction --- agitate.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agitate.el b/agitate.el index 88a22fe814..164d0fae73 100644 --- a/agitate.el +++ b/agitate.el @@ -234,7 +234,7 @@ to the text at point." (defun agitate--vc-git-get-hash-from-string (string) "Return commit hash from beginning of STRING." - (when (string-match "\\b\\([0-9a-z]+\\) " string) + (when (string-match "\\b\\([0-9a-z]+\\)\\(\s+\\)?" string) (match-string 1 string))) (defun agitate--vc-git-commit-prompt (&optional file long)