

def test_sync_reset(qisrc_action, git_server):
    git_server.create_repo('bar')
    git_server.create_repo('baz')
    qisrc_action('init', git_server.manifest_url)
    git_worktree = TestGitWorkTree()
    bar_proj = git_worktree.get_git_project('bar')
    baz_proj = git_worktree.get_git_project('baz')
    bar_git = TestGit(bar_proj.path)
    baz_git = TestGit(baz_proj.path)
    bar_git.checkout('-B', 'devel')
    baz_git.commit_file('unrelated.txt', 'unrelated\n')
    git_worktree.push_file('bar', 'bar.txt', 'this is bar\n')
    qisrc_action('sync', '--reset')
    assert (bar_git.get_current_branch() == 'master')
    assert (bar_git.read_file('bar.txt') == 'this is bar\n')
    with pytest.raises(Exception):
        baz_git.read_file('unrelated.txt')

dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/test/test_qisrc_sync.py test_sync_reset/VarMisuse@95/179 `git_server`->`git_worktree`