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

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

[elpa] externals/agitate 6eb66ed1cc 44/67: Add helper to extract commit


From: ELPA Syncer
Subject: [elpa] externals/agitate 6eb66ed1cc 44/67: Add helper to extract commit hash
Date: Wed, 28 Sep 2022 16:57:28 -0400 (EDT)

branch: externals/agitate
commit 6eb66ed1cc287d4da23ef6a1166f2b49569dc0e5
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@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'.



reply via email to

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