Skip to main content

decide_selection

Function decide_selection 

Source
pub fn decide_selection(
    region: &CommitRegion,
    conclusion: Conclusion,
) -> Selection
Expand 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';