MCPcopy Index your code
hub / github.com/anomalyco/opencode / checkoutLocalBranch

Function checkoutLocalBranch

packages/opencode/src/cli/cmd/github.handler.ts:1047–1055  ·  view source on GitHub ↗
(pr: GitHubPullRequest)

Source from the content-addressed store, hash-verified

1045 }
1046
1047 async function checkoutLocalBranch(pr: GitHubPullRequest) {
1048 console.log("Checking out local branch...")
1049
1050 const branch = pr.headRefName
1051 const depth = Math.max(pr.commits.totalCount, 20)
1052
1053 await gitRun(["fetch", "origin", `--depth=${depth}`, branch])
1054 await gitRun(["checkout", branch])
1055 }
1056
1057 async function checkoutForkBranch(pr: GitHubPullRequest) {
1058 console.log("Checking out fork branch...")

Callers 1

github.handler.tsFile · 0.70

Calls 2

gitRunFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected