def test_fail_if_empty(tmpdir, test_git):
    foo_git = test_git(tmpdir.strpath)
    branch = Branch()
    branch.name = "master"
    branch.tracks = "origin"
    foo_git.set_tracking_branch("master", "origin")  # repo empty: fails
    (res, message) = foo_git.sync_branch(branch)
    assert res is None
    assert "no commits" in message
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/test/test_sync_git.py/test_fail_if_empty/original