Implement a unified-diff patch applier. Given a diff file (in unified diff format) and a directory of…
Implement a unified-diff patch applier. Given a diff file (in unified diff format) and a directory of…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Exact I/O contract: - Input: a diff file path and a root directory path (both as command-line arguments) - The…
The task
Exact I/O contract: - Input: a diff file path and a root directory path (both as command-line arguments) - The root directory contains the original file tree to be patched - The diff file is in unified diff format (with "---" and "+++" headers, "@@" hunk headers) - The diff may contain multiple files, each with one…
Part of ai-and/termgrade-environments.