pub fn decide_selection(
region: &CommitRegion,
conclusion: Conclusion,
) -> SelectionExpand description
What: Decide the selection facts of one commit invocation. Why: Invalid combinations reach native Git unchanged, so it rejects them.
In TS you’d write (pseudocode):
const mode = region.hasNoOnlyFlag || concludesSequencer || readOnlySelection || region.hasAllFlag || (!selectsPaths) ? 'index' : 'explicit-path';