

def test_incorrect_branch_still_fetches(qisrc_action, git_server):
    git_server.create_repo('foo.git')
    qisrc_action('init', git_server.manifest_url)
    qisrc_action('sync')
    git_worktree = TestGitWorkTree()
    foo = git_worktree.get_git_project('foo')
    test_git = TestGit(foo.path)
    test_git.checkout('-b', 'wip')
    git_server.push_file('foo.git', 'foo.txt', 'some change')
    previous_sha1 = test_git.get_ref_sha1('refs/remotes/origin/master')
    foo.sync()
    new_sha1 = test_git.get_ref_sha1('refs/remotes/origin/master')
    assert (previous_sha1 != new_sha1)

dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/test/test_qisrc_sync.py test_incorrect_branch_still_fetches/original