MCPcopy Create free account
hub / github.com/cli/cli / gitDeadlineEnvironment

Function gitDeadlineEnvironment

script/ghmock/gitcmd.go:341–346  ·  view source on GitHub ↗
(ctx context.Context, env []string)

Source from the content-addressed store, hash-verified

339}
340
341func gitDeadlineEnvironment(ctx context.Context, env []string) []string {
342 if deadline, ok := ctx.Deadline(); ok {
343 return append(env, "GHMOCK_GIT_DEADLINE="+deadline.UTC().Format(time.RFC3339Nano))
344 }
345 return env
346}
347
348func localGit(dir string, env []string, args ...string) (string, error) {
349 ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)

Callers 2

runBinaryFunction · 0.85
cmdGitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected