MCPcopy
hub / github.com/github/git-sizer / PathResolver

Interface PathResolver

sizes/path_resolver.go:34–41  ·  view source on GitHub ↗

PathResolver figures out a "reachability path" (i.e., Git `rev-parse` input, including commit and/or file path) by which specified objects are reachable. It is used as follows: * Request an object's path using `RequestPath()`. The returned `Path` object is a placeholder for the object's path. * Te

Source from the content-addressed store, hash-verified

32// it can call `ForgetPath()`. This might free up some resources that
33// would otherwise continue consuming memory.
34type PathResolver interface {
35 RequestPath(oid git.OID, objectType string) *Path
36 ForgetPath(p *Path)
37 RecordReference(ref git.Reference)
38 RecordTreeEntry(oid git.OID, name string, childOID git.OID)
39 RecordCommit(oid, tree git.OID)
40 RecordTag(oid git.OID, tag *git.Tag)
41}
42
43type NullPathResolver struct {
44 useHash bool

Callers 5

setPathFunction · 0.65
setPathFunction · 0.65
RegisterReferenceMethod · 0.65
initializeMethod · 0.65
ScanRepositoryUsingGraphFunction · 0.65

Implementers 2

NullPathResolversizes/path_resolver.go
InOrderPathResolversizes/path_resolver.go

Calls

no outgoing calls

Tested by

no test coverage detected