mergeTreeWriteTree
mergeTreeWriteTree(
repoPath,base,branch):Promise<{conflict:boolean;tree?:string; }>
Defined in: src/forge/local.ts:151
Run git merge-tree --write-tree <base> <branch>, decoding git’s exit codes:
- exit 0 → clean merge; returns the merged tree OID (first line of stdout).
- exit 1 → genuine merge CONFLICT (
{ conflict: true }). - exit >1 → a real git failure (bad object, missing ref, etc.) → THROWS with stderr, so a genuine error is never misreported as a merge conflict. Shared by the merge path and the mergeability dry run.
Parameters
Section titled “Parameters”repoPath
Section titled “repoPath”string
string
branch
Section titled “branch”string
Returns
Section titled “Returns”Promise<{ conflict: boolean; tree?: string; }>