def run_git_command(self, command, *args, **kwargs):
        failure_ok = kwargs.get('failure_ok', False)
        shadow = kwargs.get('shadow', False)
        binary = kwargs.get('binary', False)
        stdin = kwargs.get('stdin', '')

        args = list(args)

        if not shadow:
            work_tree = self.path,
            git_dir = self.get_metadata_path('git')
            cwd = self.path
        else:
            work_tree = self.get_metadata_path('shadow')
            git_dir = self.get_metadata_path('shadow/.git')
            cwd = self.get_metadata_path('shadow')

        cmd = [
            'git',
            '--work-tree=%s' % work_tree,
            '--git-dir=%s' % git_dir,
        ]
        cmd.append(command)
        if command == 'commit':
            args.append(
                "--author='%s'" % constants.GIT_AUTHOR
            )
        cmd.extend(args)

        self.log(
            'Executing git command `%s`',
            (
                " ".join(cmd),
            ),
            logging.DEBUG,
            sublogger='git',
        )

        handle = subprocess.Popen(
            cmd,
            cwd=cwd,
            stdin=subprocess.PIPE,
            stderr=subprocess.STDOUT,
            stdout=subprocess.PIPE
        )
        result, _ = handle.communicate(stdin)

        if handle.returncode != 0 and not failure_ok:
            command = ' '.join(cmd)
            raise exceptions.GitCommandError(
                command % "Error running command `%s`",
                returncode=handle.returncode,
                stdout=result,
                cmd=command
            )
        if not binary:
            return result.decode('utf-8').strip()
        return result
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/ticketfolder.py/TicketFolder.run_git_command/swapped operands of `%`