def run_async(self, reset=False):
        in_cached_mode = self.view.settings().get("git_savvy.inline_diff.cached")
        savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")
        ignore_ws = (
            "--ignore-whitespace"
            if savvy_settings.get("inline_diff_ignore_eol_whitespaces", True)
            else None
        )
        selections = self.view.sel()
        region = selections[0]
        # For now, only support staging selections of length 0.
        if 1 > len(selections) or not region.empty():
            return

        # Git lines are 1-indexed; Sublime rows are 0-indexed.
        line_number = self.view.rowcol(region.begin())[0] + 1
        diff_lines = self.get_diff_from_line(line_number, reset)

        rel_path = self.get_rel_path()
        if os.name == "nt":
            # Git expects `/`-delimited relative paths in diff.
            rel_path = rel_path.replace("\\", "/")
        header = DIFF_HEADER.format(path=rel_path)

        full_diff = header + diff_lines + "\n"

        # The three argument combinations below result from the following
        # three scenarios:
        #
        # 1) The user is in non-cached mode and wants to stage a line/hunk, so
        #    do NOT apply the patch in reverse, but do apply it only against
        #    the cached/indexed file (not the working tree).
        # 2) The user is in non-cached mode and wants to undo a line/hunk, so
        #    DO apply the patch in reverse, and do apply it both against the
        #    index and the working tree.
        # 3) The user is in cached mode and wants to undo a line/hunk, so DO
        #    apply the patch in reverse, but only apply it against the cached/
        #    indexed file.
        #
        # NOTE: When in cached mode, the action taken will always be to apply
        #       the patch in reverse only to the index.

        args = [
            "apply",
            "--unidiff-zero",
            "--reverse" if (reset or in_cached_mode) else None,
            "--cached" if (not reset or in_cached_mode) else None,
            ignore_ws,
            "-"
        ]

        self.git(*args, stdin=full_diff)
        self.save_to_history(args, full_diff)
        self.view.run_command("gs_inline_diff_refresh")
dataset/ETHPy150Open divmain/GitSavvy/core/commands/inline_diff.py/GsInlineDiffStageOrResetBase.run_async/swapped operands of `>`