summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-magit.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index 8f2179a..0943fe8 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -894,8 +894,14 @@ appending [M/N] to each entry."
(lambda (f) (string-match-p "\\.patch\\'" f))
(magit-untracked-files))
(error "There should be patches")))
- (cover (seq-find (lambda (f) (string-match-p "\\`0+-" f))
- patches)))
+ (cover (seq-find
+ (lambda (f)
+ (string-match-p
+ (rx string-start
+ (zero-or-one "v" (one-or-more digit) "-")
+ (one-or-more "0"))
+ f))
+ patches)))
(magit-call-git "add" patches)
(magit-run-git "commit" "-mpatches")
(when cover