aboutsummaryrefslogtreecommitdiff
path: root/snippets
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2024-12-21 14:07:47 +0100
committerHanketsu <hanketsu@egregore.fun>2025-01-16 16:45:28 +0100
commit7236f86e02e14d83d092ffbf2446b46e6312f28e (patch)
tree2cd27eda24205ed6e753ec6b8113bf8b63b9614a /snippets
parent873d0e1eb86a299444a9f802fe5c2d548fcb554e (diff)
Add vendoradd snippet for vendored packages.
* snippets/tempel/text-mode.eld: New snippet.
Diffstat (limited to 'snippets')
-rw-r--r--snippets/tempel/text-mode.eld12
1 files changed, 12 insertions, 0 deletions
diff --git a/snippets/tempel/text-mode.eld b/snippets/tempel/text-mode.eld
index daa0061..a0b4516 100644
--- a/snippets/tempel/text-mode.eld
+++ b/snippets/tempel/text-mode.eld
@@ -13,6 +13,18 @@ text-mode :when (bound-and-true-p git-commit-mode)
"* " (p (or (car (magit-staged-files)) ""))
" (" (s var ) "): New variable.")
+(vendoradd\ "battering: Add "
+ (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (number-to-string
+ (count-matches "\\+(define \\(\\S-+\\)"
+ nil 'noerror)))
+ " vendored packages." n n
+ "* " (p (or (car (magit-staged-files)) ""))
+ ": New vendored packages.")
+
(remove\ "battering: Remove "
(p (with-temp-buffer
(magit-git-wash #'magit-diff-wash-diffs