(path, branch, ref string, force bool)
| 426 | } |
| 427 | |
| 428 | func 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, |
no test coverage detected