def run(self, edit, ask=True, edit_pattern=False):
        window = self.view.window()
        repo = self.get_repo()
        if not repo:
            return

        files = self.get_selected_files()
        to_ignore = [f for _, f in files]

        tracked = [f for s, f in files if s != UNTRACKED_FILES]
        if tracked or not self.confirm_tracked(tracked):
            return

        if not to_ignore:
            sublime.error_message(self.IGNORE_NO_FILES)
            return

        if edit_pattern:
            patterns = []
            to_ignore.reverse()

            def on_done(pattern=None):
                if pattern:
                    patterns.append(pattern)
                if to_ignore:
                    filename = to_ignore.pop()
                    window.show_input_panel(self.IGNORE_LABEL, filename, on_done, noop, on_done)
                elif patterns:
                    if ask:
                        if not self.confirm_ignore(patterns):
                            return

                    self.add_to_gitignore(repo, patterns)
                    goto = self.logical_goto_next_file()
                    self.update_status(goto)

            filename = to_ignore.pop()
            window.show_input_panel(self.IGNORE_LABEL, filename, on_done, noop, on_done)
        else:
            if ask:
                if not self.confirm_ignore(to_ignore):
                    return
            self.add_to_gitignore(repo, to_ignore)
            goto = self.logical_goto_next_file()
            self.update_status(goto)
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/status.py/GitStatusIgnoreCommand.run/operator `and` -> `or`