yield commits using git log -- <dir>

def git_log_iterator(path):
    """ yield commits using git log -- <dir> """
    N = 10
    count = 0
    while True:
        lines = _run_git_command_lines(['log', '--oneline',
                                        '-n', str(N),
                                        '--skip', str(count),
                                        '--', '.'], cwd=path)
        for line in lines:
            sha = line.split(' ', 1)[0]
            count += 1
            yield sha
        if len(lines) < N:
            break