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

Function worktreeCheckoutCmds

pkg/cmd/pr/checkout/checkout.go:428–432  ·  view source on GitHub ↗
(path, branch, ref string, force bool)

Source from the content-addressed store, hash-verified

426}
427
428func worktreeCheckoutCmds(path, branch, ref string, force bool) [][]string {
429 cmds := [][]string{{"-C", path, "checkout", branch}}
430 cmds = append(cmds, syncBranchCmds(path, ref, force)...)
431 return cmds
432}
433
434// ensureWorktreePathSafe validates a --worktree target before we write to it:
435// it must be a non-existent path (git will create it) or an existing directory,

Callers 1

cmdsForExistingRemoteFunction · 0.85

Calls 1

syncBranchCmdsFunction · 0.85

Tested by

no test coverage detected