@@ -212,7 +212,7 @@ func shallowCopyManagers(managers fieldpath.ManagedFields) fieldpath.ManagedFiel
212212 return newManagers
213213}
214214
215- // prune will remove a list or map item, iff:
215+ // prune will remove a field, list or map item, iff:
216216// * applyingManager applied it last time
217217// * applyingManager didn't apply it this time
218218// * no other applier claims to manage it
@@ -240,7 +240,7 @@ func (s *Updater) prune(merged *typed.TypedValue, managers fieldpath.ManagedFiel
240240 return s .Converter .Convert (pruned , managers [applyingManager ].APIVersion ())
241241}
242242
243- // addBackOwnedItems adds back any list and map items that were removed by prune,
243+ // addBackOwnedItems adds back any fields, list and map items that were removed by prune,
244244// but other appliers (or the current applier's new config) claim to own.
245245func (s * Updater ) addBackOwnedItems (merged , pruned * typed.TypedValue , managedFields fieldpath.ManagedFields , applyingManager string ) (* typed.TypedValue , error ) {
246246 var err error
@@ -281,9 +281,9 @@ func (s *Updater) addBackOwnedItems(merged, pruned *typed.TypedValue, managedFie
281281 return pruned , nil
282282}
283283
284- // addBackDanglingItems makes sure that the only items removed by prune are items that were
285- // previously owned by the currently applying manager. This will add back unowned items and items
286- // which are owned by Updaters that shouldn't be removed.
284+ // addBackDanglingItems makes sure that the fields list and map items removed by prune were
285+ // previously owned by the currently applying manager. This will add back fields list and map items
286+ // that are unowned or that are owned by Updaters and shouldn't be removed.
287287func (s * Updater ) addBackDanglingItems (merged , pruned * typed.TypedValue , lastSet fieldpath.VersionedSet ) (* typed.TypedValue , error ) {
288288 convertedPruned , err := s .Converter .Convert (pruned , lastSet .APIVersion ())
289289 if err != nil {
0 commit comments