MCPcopy
hub / github.com/docker/compose / gitCommandEnv

Method gitCommandEnv

pkg/remote/git.go:243–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241}
242
243func (g gitRemoteLoader) gitCommandEnv() []string {
244 env := types.NewMapping(os.Environ())
245 if env["GIT_TERMINAL_PROMPT"] == "" {
246 // Disable prompting for passwords by Git until user explicitly asks for it.
247 env["GIT_TERMINAL_PROMPT"] = "0"
248 }
249 if env["GIT_SSH"] == "" && env["GIT_SSH_COMMAND"] == "" {
250 // Disable any ssh connection pooling by Git and do not attempt to prompt the user.
251 env["GIT_SSH_COMMAND"] = "ssh -o ControlMaster=no -o BatchMode=yes"
252 }
253 v := env.Values()
254 return v
255}
256
257func findFile(names []string, pwd string) (string, error) {
258 for _, n := range names {

Callers 2

resolveGitRefMethod · 0.95
checkoutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected