resolveDefaultBranch
resolveDefaultBranch(
dir,opts):Promise<string|null>
Defined in: src/pull.ts:38
Resolve the default branch name for dir, in order:
hint— only iforigin/<hint>actually exists (never trust the client blindly).- local
origin/HEAD(origin/main→main). await opts.forgeDefault?.().- none → null. A failing git step just falls through to the next source.
Parameters
Section titled “Parameters”string
forgeDefault?
Section titled “forgeDefault?”() => Promise<string | null>
string
Returns
Section titled “Returns”Promise<string | null>