MCPcopy Index your code
hub / github.com/numpy/numpy / diff_files

Function diff_files

tools/check_python_h_first.py:214–239  ·  view source on GitHub ↗

Find the diff since the given SHA. Adapted from lint.py

(sha: str)

Source from the content-addressed store, hash-verified

212
213
214def diff_files(sha: str) -> list[str]:
215 """Find the diff since the given SHA.
216
217 Adapted from lint.py
218 """
219 res = subprocess.run(
220 [
221 "git",
222 "diff",
223 "--name-only",
224 "--diff-filter=ACMR",
225 "-z",
226 sha,
227 "--",
228 # Check against C_CPP_EXTENSIONS
229 "*.[chCH]",
230 "*.[ch]pp",
231 "*.[ch]xx",
232 "*.cc",
233 "*.hh",
234 ],
235 stdout=subprocess.PIPE,
236 encoding="utf-8",
237 )
238 res.check_returncode()
239 return [f for f in res.stdout.split("\0") if f]
240
241
242if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

splitMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…