(root_path)
| 117 | yield full_path |
| 118 | |
| 119 | def walk_git_files(root_path): |
| 120 | p = subprocess.Popen(['git', '-C', root_path, 'ls-files', root_path], stdout=subprocess.PIPE) |
| 121 | for line in p.stdout.readlines(): |
| 122 | path = line.decode('utf-8').strip() |
| 123 | full_path = os.path.join(root_path, path) |
| 124 | yield full_path |
| 125 | if p.wait() != 0: |
| 126 | raise RuntimeError('git exited with %r' % p.returncode) |
| 127 | |
| 128 | def main(args): |
| 129 | root_path = os.path.abspath(args.path) |