Skip to content

Commit 5cc40d9

Browse files
Add Conflicts.ToSet()
1 parent e95fcaa commit 5cc40d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

merge/conflict.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ func (c Conflicts) Equals(c2 Conflicts) bool {
9595
return true
9696
}
9797

98+
func (c Conflicts) ToSet() *fieldpath.Set {
99+
set := fieldpath.NewSet()
100+
for _, conflict := range []Conflict(c) {
101+
set.Insert(conflict.Path)
102+
}
103+
return set
104+
}
105+
98106
// ConflictsFromManagers creates a list of conflicts given Managers sets.
99107
func ConflictsFromManagers(sets fieldpath.ManagedFields) Conflicts {
100108
conflicts := []Conflict{}

0 commit comments

Comments
 (0)