def METHOD_NAME(source: Path, yes: bool):
    if not yes and TEST_REPO_EXPORT_PTH.is_file():
        click.confirm(
            f"Test repo file ({str(TEST_REPO_EXPORT_PTH)}) already exists, "
            "are you sure you want to replace it?",
            abort=True,
        )
    p = _run(
        ("git", "-C", str(source), "fast-export", "--all", "--show-original-ids"), stdout=sp.PIPE
    )
    with TEST_REPO_EXPORT_PTH.open(mode="wb") as f:
        f.write(
            b"# THIS FILE SHOULDN'T BE EDITED MANUALLY. "
            b"USE `edit_testrepo.py` TOOL TO UPDATE THE REPO.\n" + p.stdout
        )
    click.echo("Test repo successfully exported.")