MCPcopy Index your code
hub / github.com/cli/cli / newDefaultPushTarget

Function newDefaultPushTarget

pkg/cmd/pr/shared/find_refs_resolution.go:291–296  ·  view source on GitHub ↗

newDefaultPushTarget is a thin wrapper over defaultPushTarget to help with generic type inference, to reduce verbosity in repeating the parametric type.

(remote remote, branchName string)

Source from the content-addressed store, hash-verified

289// newDefaultPushTarget is a thin wrapper over defaultPushTarget to help with
290// generic type inference, to reduce verbosity in repeating the parametric type.
291func newDefaultPushTarget(remote remote, branchName string) defaultPushTarget {
292 return defaultPushTarget{
293 remote: o.Some(remote),
294 branchName: branchName,
295 }
296}
297
298// tryDetermineDefaultPushTarget uses git configuration to make a best guess about where a branch
299// is pushed to, and where it would be pushed to if the user ran `git push` with no additional

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected