MCPcopy
hub / github.com/git-lfs/git-lfs / Add

Method Add

tools/stringset.go:35–39  ·  view source on GitHub ↗

Adds an item to the current set if it doesn't already exist in the set.

(i string)

Source from the content-addressed store, hash-verified

33
34// Adds an item to the current set if it doesn't already exist in the set.
35func (set StringSet) Add(i string) bool {
36 _, found := set[i]
37 set[i] = struct{}{}
38 return !found //False if it e xisted already
39}
40
41// Determines if a given item is already in the set.
42func (set StringSet) Contains(i string) bool {

Callers 9

UnionMethod · 0.95
IntersectMethod · 0.95
DifferenceMethod · 0.95
CloneMethod · 0.95
calcSkippedRefsFunction · 0.95
pruneFunction · 0.95
prepareUploadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected