()
| 241 | } |
| 242 | |
| 243 | func (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 | |
| 257 | func findFile(names []string, pwd string) (string, error) { |
| 258 | for _, n := range names { |
no outgoing calls
no test coverage detected