Drop mutate-changes' --no-renames, which a diff limited to the changed paths makes moot, and test the reason each of its failures gives
CI / tests (pull_request) Successful in 2m25s
CI / tests (pull_request) Successful in 2m25s
This commit is contained in:
@@ -111,14 +111,14 @@ def mutate(given: dict[str, str]) -> list[str] | Failure:
|
||||
|
||||
def changed_by_tool(checkout: str, merge_base: str) -> dict[str, dict[str, frozenset[int]]] | Failure:
|
||||
"""Each tool's files that the working tree changes since merge_base, by path from the checkout's top, with their changed lines."""
|
||||
names = git("diff", "--name-only", "-z", "--diff-filter=d", "--no-renames", merge_base, cwd=checkout)
|
||||
names = git("diff", "--name-only", "-z", "--diff-filter=d", merge_base, cwd=checkout)
|
||||
if isinstance(names, Failure):
|
||||
return names
|
||||
changed: dict[str, dict[str, frozenset[int]]] = {}
|
||||
for path in filter(None, names.split("\0")):
|
||||
if (tool := tool_for(path)) is None:
|
||||
continue
|
||||
diff = git("diff", "-U0", "--no-color", "--no-ext-diff", "--no-textconv", "--no-renames", merge_base, "--", path, cwd=checkout, errors="replace")
|
||||
diff = git("diff", "-U0", "--no-color", "--no-ext-diff", "--no-textconv", merge_base, "--", path, cwd=checkout, errors="replace")
|
||||
if isinstance(diff, Failure):
|
||||
return diff
|
||||
if lines := added_lines(diff):
|
||||
|
||||
Reference in New Issue
Block a user