MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / Difference

Method Difference

tools/stringset.go:105–113  ·  view source on GitHub ↗

Returns a new set with items in the current set but not in the other set

(other StringSet)

Source from the content-addressed store, hash-verified

103
104// Returns a new set with items in the current set but not in the other set
105func (set StringSet) Difference(other StringSet) StringSet {
106 differencedSet := NewStringSet()
107 for elem := range set {
108 if !other.Contains(elem) {
109 differencedSet.Add(elem)
110 }
111 }
112 return differencedSet
113}
114
115// Returns a new set with items in the current set or the other set but not in both.
116func (set StringSet) SymmetricDifference(other StringSet) StringSet {

Callers 2

SymmetricDifferenceMethod · 0.95
TestOrderedSetDifferenceFunction · 0.45

Calls 3

AddMethod · 0.95
NewStringSetFunction · 0.85
ContainsMethod · 0.65

Tested by 1

TestOrderedSetDifferenceFunction · 0.36