MCPcopy Create free account
hub / github.com/HashLoad/boss / GetRepository

Function GetRepository

core/gitWrapper/git.go:99–108  ·  view source on GitHub ↗
(dep models.Dependency)

Source from the content-addressed store, hash-verified

97}
98
99func GetRepository(dep models.Dependency) *git.Repository {
100 cache := makeStorageCache(dep)
101 dir := osfs.New(filepath.Join(env.GetModulesDir(), dep.GetName()))
102 repository, e := git.Open(cache, dir)
103 if e != nil {
104 msg.Err("Error on open repository %s: %s", dep.Repository, e)
105 }
106
107 return repository
108}

Callers 3

ensureModulesFunction · 0.92
CloneCacheNativeFunction · 0.85
UpdateCacheNativeFunction · 0.85

Calls 5

GetModulesDirFunction · 0.92
ErrFunction · 0.92
makeStorageCacheFunction · 0.85
NewMethod · 0.80
GetNameMethod · 0.80

Tested by

no test coverage detected