aboutsummaryrefslogtreecommitdiff
path: root/snippets/tempel
diff options
context:
space:
mode:
Diffstat (limited to 'snippets/tempel')
-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