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

Function addGitAuthentication

internal/run/stub.go:144–151  ·  view source on GitHub ↗

Inject git authentication string for specific git commands.

(s string)

Source from the content-addressed store, hash-verified

142
143// Inject git authentication string for specific git commands.
144func addGitAuthentication(s string) string {
145 pattern := regexp.MustCompile(`( fetch | pull | push | clone | remote add.+-f | submodule )`)
146 loc := pattern.FindStringIndex(s)
147 if loc == nil {
148 return s
149 }
150 return s[:loc[0]+1] + gitAuthRE + s[loc[0]+1:]
151}

Callers 1

RegisterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…