branch: elpa/magit
commit 453c7876e7c13467de58741dee93dfd7c527dc56
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
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 bac89376a2b..7bfba21ac60 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.