MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / changed_files

Function changed_files

scripts/check_article_quality.py:107–115  ·  view source on GitHub ↗
(base: str, head: str)

Source from the content-addressed store, hash-verified

105
106
107def changed_files(base: str, head: str) -> list[Path]:
108 if ZERO_SHA.fullmatch(base):
109 return all_article_files()
110
111 diff_expr = f"{base}...{head}"
112 output = run_git(["diff", "--name-only", "--diff-filter=ACMRT", diff_expr], check=False)
113 if not output.strip():
114 output = run_git(["diff", "--name-only", "--diff-filter=ACMRT", f"{base}..{head}"])
115 return sorted(Path(line) for line in output.splitlines() if line.strip())
116
117
118def staged_files() -> list[Path]:

Callers 1

collect_pathsFunction · 0.85

Calls 2

all_article_filesFunction · 0.85
run_gitFunction · 0.85

Tested by

no test coverage detected