pub fn common_source(
context: &GitContext,
identity: &WorktreeIdentity,
) -> Result<SnapshotSource, String>Expand description
What:
Check the creating worktree for everything a copy of its files needs; the reason is the error.
Why:
Callers that only log or compare the reason ask for the words; the ladder asks source_refusal for the kind too.
In TS you’d write (pseudocode):
async function commonSource(context: GitContext, identity: WorktreeIdentity): Promise<SnapshotSource>; // throws a reason