MCPcopy Create free account
hub / github.com/DFHack/dfhack / walk_git_files

Function walk_git_files

ci/lint.py:119–126  ·  view source on GitHub ↗
(root_path)

Source from the content-addressed store, hash-verified

117 yield full_path
118
119def 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
128def main(args):
129 root_path = os.path.abspath(args.path)

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected