(
repo_dir: str
)
| 508 | print(text_to_print, end=end, file=file) |
| 509 | |
| 510 | def extract_patch( |
| 511 | repo_dir: str |
| 512 | ) -> str: |
| 513 | random_name = generate_random_string(8) |
| 514 | os.system(f"cd {repo_dir} && git diff HEAD > {DEFAULT_PATCHES_DIR}/{random_name}.diff") |
| 515 | |
| 516 | with open(f"{DEFAULT_PATCHES_DIR}/{random_name}.diff", "r") as f: |
| 517 | patch = f.read() |
| 518 | return patch |
| 519 | |
| 520 | def find_matching_abs_path(parent_folder, sub_path): |
| 521 | # Walk through the parent folder to find matching sub-path |
no test coverage detected