Function: magit-section-ident-value

magit-section-ident-value is a byte-compiled function defined in magit-section.el.

Signature

(magit-section-ident-value OBJECT)

Documentation

Return OBJECT's value, making it constant and unique if necessary.

This is used to correlate different incarnations of the same section, see magit-section-ident and magit-get-section.

Sections whose values are not constant and/or unique should implement a method that return a value that can be used for thispurpose.

Implementations

(magit-section-ident-value (OBJ forge-object)) in `forge-core.el'.

Return the value ob OBJ's `id' slot. Using OBJ itself would not be appropriate because multiple non-equal objects may exist, representing the same thing.

(magit-section-ident-value (SECTION magit-unpushed-section)) in `magit-log.el'.

Return "..@{push}". "..@{push}" cannot be used as the value because that is ambiguous if `push.default' does not allow a 1:1 mapping, and many commands would fail because of that. But here that does not matter and we need an unique value, so we use that string in the pushremote case.

(magit-section-ident-value (SECTION magit-unpulled-section)) in `magit-log.el'.

Return "..@{push}". "..@{push}" cannot be used as the value because that is ambiguous if `push.default' does not allow a 1:1 mapping, and many commands would fail because of that. But here that does not matter and we need an unique value, so we use that string in the pushremote case.

(magit-section-ident-value (OBJECT eieio-default-superclass)) in `magit-section.el'.

For values that are objects, simply return the object itself. Two objects that represent the same entity are not `equal'. So if the values of the objects of a certain section class are themselves objects, then a method has to be defined for objects of one of the involved classes.

(magit-section-ident-value (SECTION magit-section)) in `magit-section.el'.

Return the value unless it is an object.

Different object incarnations representing the same value tend to not be equal, so call this generic function on the object itself to determine a constant value.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(cl-defgeneric magit-section-ident-value (object)
  "Return OBJECT's value, making it constant and unique if necessary.

This is used to correlate different incarnations of the same
section, see `magit-section-ident' and `magit-get-section'.

Sections whose values are not constant and/or unique should
implement a method that return a value that can be used for
thispurpose.")