branch: externals/agitate commit 6eb66ed1cc287d4da23ef6a1166f2b49569dc0e5 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Add helper to extract commit hash --- agitate.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agitate.el b/agitate.el index 34d036c6a5..9ca24f4b5d 100644 --- a/agitate.el +++ b/agitate.el @@ -260,6 +260,11 @@ to the text at point." ;;;; Commands for vc-git (Git backend for the Version Control framework) +(defun agitate--vc-git-get-hash-from-string (string) + "Return commit hash from STRING" + (when (string-match "\\b\\([0-9a-z]+\\) " string) + (match-string 1 string))) + ;;;###autoload (defun agitate-vc-git-grep (regexp) "Run `git-grep(1)' for REGEXP in `vc-root-dir'.