zed-industries/zed · error · RuntimeError
origin/main tip {main_sha[:12]} unavailable locally after fe
Error message
origin/main tip {main_sha[:12]} unavailable locally after fetch What it means
Error "origin/main tip {main_sha[:12]} unavailable locally after fetch" thrown in zed-industries/zed.
Source
Thrown at crates/eval_cli/zed_eval/source.py:107
def base_sha_on_main(base_sha: str, repo_url: str) -> bool:
"""Whether `base_sha` is reachable from origin/main.
Resolves origin/main's tip against the remote (so it doesn't depend on the
caller's possibly-stale local refs), fetching main if the objects aren't
present locally, then checks ancestry. Raises only when the main tip can't be
made available locally (a network/remote problem), so callers can
distinguish that from a definitive "not on main".
"""
main_sha = resolve_remote_ref(repo_url, "main")
if base_sha.lower() == main_sha.lower():
return True
if not (commit_present(base_sha) and commit_present(main_sha)):
subprocess.run(
["git", "-C", repo_root(), "fetch", "--quiet", repo_url, "main"],
capture_output=True,
)
if not commit_present(main_sha):
raise RuntimeError(
f"origin/main tip {main_sha[:12]} unavailable locally after fetch"
)
if not commit_present(base_sha):
# Not present even after pulling main's history -> not reachable from main.
return False
ancestry = subprocess.run(
["git", "-C", repo_root(), "merge-base", "--is-ancestor", base_sha, main_sha],
capture_output=True,
)
if ancestry.returncode in (0, 1):
return ancestry.returncode == 0
raise RuntimeError(
(ancestry.stderr or b"").decode(errors="replace").strip()
or "git merge-base --is-ancestor failed"
)
def resolve_git_ref(ref: str) -> str:View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/eval_cli/zed_eval/source.py:107 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/d979c6ae26a94350.
Report an issue: GitHub.