{"record":{"id":"475b235fc7a623d3","repo":"zed-industries/zed","slug":"could-not-resolve-ref-ref-against-repo-url","errorCode":null,"errorMessage":"could not resolve ref '{ref}' against {repo_url}. Push the commit/tag, or pass a full commit SHA.","messagePattern":"could not resolve ref '(.+?)' against (.+?)\\. Push the commit/tag, or pass a full commit SHA\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"crates/eval_cli/zed_eval/source.py","lineNumber":164,"sourceCode":"            repo_url,\n            ref,\n            f\"refs/tags/{ref}\",\n            f\"refs/heads/{ref}\",\n        ]\n    )\n    entries: list[tuple[str, str]] = []\n    for line in output.splitlines():\n        sha, _, name = line.partition(\"\\t\")\n        if sha and name:\n            entries.append((name, sha))\n    # An annotated tag yields both the tag object and a peeled \"<ref>^{}\" entry\n    # pointing at the underlying commit; the commit is what we want to build.\n    for name, sha in entries:\n        if name.endswith(\"^{}\"):\n            return sha\n    if entries:\n        return entries[0][1]\n    raise ValueError(\n        f\"could not resolve ref '{ref}' against {repo_url}. \"\n        \"Push the commit/tag, or pass a full commit SHA.\"\n    )\n\n\ndef current_ref_name() -> str | None:\n    try:\n        ref_name = git_output([\"rev-parse\", \"--abbrev-ref\", \"HEAD\"])\n    except (OSError, subprocess.CalledProcessError):\n        return None\n    return None if ref_name == \"HEAD\" else ref_name\n\n\ndef current_tracked_patch(base_sha: str) -> str:\n    result = subprocess.run(\n        [\"git\", \"diff\", \"--binary\", base_sha],\n        cwd=repo_root(),\n        check=True,","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/eval_cli/zed_eval/source.py#L146-L182","documentation":"Error \"could not resolve ref '{ref}' against {repo_url}. Push the commit/tag, or pass a full commit SHA.\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at crates/eval_cli/zed_eval/source.py:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}