'Implement un/staging of the selected line(s) or hunk.'

def process_diff_selection(self, reverse=False, apply_to_worktree=False):

    if selection.selection_model().is_empty():
        return
    (first_line_idx, last_line_idx) = self.selected_lines()
    cmds.do(cmds.ApplyDiffSelection, first_line_idx, last_line_idx, self.has_selection(), reverse, apply_to_worktree)
