def test_do_not_call_rebase_abort_when_reset_fails(git_server, tmpdir, test_git):
    foo_git = create_foo(git_server, tmpdir, test_git)
    branch = Branch()
    branch.name = "master"
    branch.tracks = "origin"
    git_server.push_file("foo.git", "README", "README on master")
    foo_path = foo_git.repo
    index_lock = os.path.join(foo_path, ".git", "index.lock")
    with open(index_lock, "w") as fp:
        fp.write("")
    (res, message) =  foo_git.sync_branch(branch)
    assert res is False
    assert "rebase --abort" not in message
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/test/test_sync_git.py/test_do_not_call_rebase_abort_when_reset_fails/original