def METHOD_NAME(self, cmd, *args, **kwargs):
    if not kwargs.get('shell'):
        return check_output(["git", "--git-dir=" + self.repo.root + "/.git", cmd] + list(args)).rstrip('\n')
    else:
        assert args == []
        return check_output(["git --git-dir='" + self.repo.root + "/.git' " + cmd], shell=True).rstrip('\n')