zed-industries/zed · error · ValueError

could not resolve ref '{ref}' against {repo_url}. Push the c

Error message

could not resolve ref '{ref}' against {repo_url}. Push the commit/tag, or pass a full commit SHA.

What it means

Error "could not resolve ref '{ref}' against {repo_url}. Push the commit/tag, or pass a full commit SHA." thrown in zed-industries/zed.

Source

Thrown at crates/eval_cli/zed_eval/source.py:164

            repo_url,
            ref,
            f"refs/tags/{ref}",
            f"refs/heads/{ref}",
        ]
    )
    entries: list[tuple[str, str]] = []
    for line in output.splitlines():
        sha, _, name = line.partition("\t")
        if sha and name:
            entries.append((name, sha))
    # An annotated tag yields both the tag object and a peeled "<ref>^{}" entry
    # pointing at the underlying commit; the commit is what we want to build.
    for name, sha in entries:
        if name.endswith("^{}"):
            return sha
    if entries:
        return entries[0][1]
    raise ValueError(
        f"could not resolve ref '{ref}' against {repo_url}. "
        "Push the commit/tag, or pass a full commit SHA."
    )


def current_ref_name() -> str | None:
    try:
        ref_name = git_output(["rev-parse", "--abbrev-ref", "HEAD"])
    except (OSError, subprocess.CalledProcessError):
        return None
    return None if ref_name == "HEAD" else ref_name


def current_tracked_patch(base_sha: str) -> str:
    result = subprocess.run(
        ["git", "diff", "--binary", base_sha],
        cwd=repo_root(),
        check=True,

View on GitHub (pinned to bc538def45)

When it happens

Trigger: Thrown at crates/eval_cli/zed_eval/source.py:164 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/475b235fc7a623d3. Report an issue: GitHub.