def METHOD_NAME(tmp_dir, dvc, caplog):
    (tmp_dir / "ancestor").touch()
    (tmp_dir / "our").write_text(
        "outs:\n"
        "- md5: f123456789.dir\n"
        "  hash: md5\n"
        "  path: path\n"
        "- md5: ff123456789.dir\n"
        "  hash: md5\n"
        "  path: another\n"
    )
    (tmp_dir / "their").write_text(
        "outs:\n- md5: f987654321\n  hash: md5\n  path: path\n"
    )
    assert (
        main(
            [
                "git-hook",
                "merge-driver",
                "--ancestor",
                "ancestor",
                "--our",
                "our",
                "--their",
                "their",
            ]
        )
        != 0
    )
    error = "unable to auto-merge DVC files that weren't created by `dvc add`"
    assert error in caplog.text