Skip to content

Commit b060ad1

Browse files
Refactoring the code and fixing go doc for equalUpdate()
Commit f8eff25 (PR #170) missed to update the doc string Signed-off-by: Lalatendu Mohanty <[email protected]>
1 parent 0fa9b04 commit b060ad1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/cvo/sync_worker.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,10 @@ func (w *SyncWorker) calculateNext(work *SyncWork) bool {
429429
return changed
430430
}
431431

432-
// equalUpdate returns true if two updates have the same image.
432+
// equalUpdate returns true if two updates are semantically equivalent.
433+
// It checks if the updates have have the same force and image values
433434
func equalUpdate(a, b configv1.Update) bool {
434-
if a.Force != b.Force {
435-
return false
436-
}
437-
return a.Image == b.Image
435+
return a.Force == b.Force && a.Image == b.Image
438436
}
439437

440438
// equalSyncWork returns true if a and b are equal.

0 commit comments

Comments
 (0)