in src/main/kotlin/com/jetbrains/interactiveRebase/services/ModelService.kt [94:110]
fun addToSelectedCommits(
commit: CommitInfo,
branchInfo: BranchInfo,
) {
project.takeAction {
if (commit.isCollapsed) return@takeAction
commit.isSelected = true
branchInfo.addSelectedCommits(commit)
commit.getChangesAfterPick().forEach { change ->
if (change is FixupCommand || change is SquashCommand) {
project.service<ActionService>().getCombinedCommits(change).forEach {
branchInfo.addSelectedCommits(it)
}
}
}
}
}