branch: elpa/magit commit 453c7876e7c13467de58741dee93dfd7c527dc56 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-section-equal: New function --- lisp/magit-section.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index bac89376a2..7bfba21ac6 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -547,6 +547,11 @@ The return value has the form ((TYPE . VALUE)...)." (and-let* ((parent (oref section parent))) (magit-section-ident parent)))) +(defun magit-section-equal (a b) + "Return t if A an B are the same section." + (and a b (equal (magit-section-ident a) + (magit-section-ident b)))) + (cl-defgeneric magit-section-ident-value (object) "Return OBJECT's value, making it constant and unique if necessary.