Skip to content

Commit 22322f5

Browse files
committed
fix: support magit 2.90
The magit-section-when function has been deprecated in magit 2.90 [1] and was removed in March. [1]: https://github.com/magit/magit/blob/c7ab6931c61e63db02edd2f9ad3688312936cf0b/docs/RelNotes/2.90.0.org#breaking-changes Fixes: #16 Suggested-by: cpg314
1 parent b31570b commit 22322f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

magit-stgit.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ PROMPT."
200200
region
201201
(and use-marks
202202
(magit-stgit-patches-sorted magit-stgit-marked-patches))
203-
(list (or (and use-point (magit-section-when stgit-patch))
203+
(list (or (and use-point
204+
(if (fboundp 'magit-section-value-if)
205+
(magit-section-value-if 'stgit-patch)
206+
(magit-section-when stgit-patch)))
204207
(and prompt (magit-stgit-read-patch prompt require-match)))))))
205208

206209
;;; Marking

0 commit comments

Comments
 (0)