MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / handleIsBranchMerged

Function handleIsBranchMerged

projects/electron/src/modules/code/git.ts:1298–1306  ·  view source on GitHub ↗
(params: IsBranchMergedParams)

Source from the content-addressed store, hash-verified

1296}
1297
1298async function handleIsBranchMerged(params: IsBranchMergedParams): Promise<boolean> {
1299 const { repoRoot } = await resolveGitInfo(params.repoDir)
1300 try {
1301 await execGit(["merge-base", "--is-ancestor", params.branchName, params.targetBranch], repoRoot)
1302 return true // exit 0 = is ancestor = fully merged
1303 } catch {
1304 return false // exit 1 = not ancestor = unmerged
1305 }
1306}
1307
1308async function handleDeleteBranch(params: DeleteBranchParams): Promise<void> {
1309 const { repoRoot } = await resolveGitInfo(params.repoDir)

Callers 1

isRuntimeBranchMergedFunction · 0.85

Calls 2

resolveGitInfoFunction · 0.85
execGitFunction · 0.85

Tested by

no test coverage detected