def _git_cmd_for_pkg_version(env, brew_cmd, pkg, version):
    git_cmd = None
    for git_line in env.safe_run_output("{brew_cmd} versions {pkg}".format(**locals())).split("\n"):
        if git_line.startswith(version):
            git_cmd = " ".join(git_line.rstrip().split()[1:])
            break
    if git_cmd is None:
        raise ValueError("Did not find version %s for %s" % (version, pkg))
    return git_cmd
Watching a different thread than the one we're replying to shouldn't
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/package/brew.py/_git_cmd_for_pkg_version--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/kbforums/tests/test_notifications.py/NotificationsTests.test_watch_other_thread_then_reply