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

Function NewContext

lfshttp/lfshttp.go:25–42  ·  view source on GitHub ↗
(gitConf *git.Configuration, osEnv, gitEnv map[string]string)

Source from the content-addressed store, hash-verified

23}
24
25func NewContext(gitConf *git.Configuration, osEnv, gitEnv map[string]string) Context {
26 c := &testContext{gitConfig: gitConf}
27 if c.gitConfig == nil {
28 c.gitConfig = git.NewConfig("", "")
29 }
30 if osEnv != nil {
31 c.osEnv = testEnv(osEnv)
32 } else {
33 c.osEnv = make(testEnv)
34 }
35
36 if gitEnv != nil {
37 c.gitEnv = testEnv(gitEnv)
38 } else {
39 c.gitEnv = make(testEnv)
40 }
41 return c
42}
43
44type testContext struct {
45 gitConfig *git.Configuration

Calls 2

NewConfigFunction · 0.92
testEnvTypeAlias · 0.85