mislav/hub · error
Aborted: no revision could be determined from '%s'
Error message
Aborted: no revision could be determined from '%s'
What it means
`hub ci-status <ref>` resolves the given ref to a SHA via git.Ref(). If git cannot resolve the argument to a revision, hub discards the underlying git error and reports this fatal message instead, since a CI status can only be fetched for a concrete commit. The command aborts via utils.Check.
Source
Thrown at commands/ci_status.go:95
}
return -1
}
func ciStatus(cmd *Command, args *Args) {
ref := "HEAD"
if !args.IsParamsEmpty() {
ref = args.RemoveParam(0)
}
localRepo, err := github.LocalRepo()
utils.Check(err)
project, err := localRepo.MainProject()
utils.Check(err)
sha, err := git.Ref(ref)
if err != nil {
err = fmt.Errorf("Aborted: no revision could be determined from '%s'", ref)
}
utils.Check(err)
if args.Noop {
ui.Printf("Would request CI status for %s\n", sha)
} else {
gh := github.NewClient(project.Host)
response, err := gh.FetchCIStatus(project, sha)
utils.Check(err)
state := ""
if len(response.Statuses) > 0 {
for _, status := range response.Statuses {
if checkSeverity(status.State) > checkSeverity(state) {
state = status.State
}
}
}View on GitHub (pinned to 5c547ed804)
Solutions
- Verify the ref exists locally: `git rev-parse <ref>` — fix typos or use the full branch name.
- Fetch first if the ref is remote: `git fetch origin` then retry hub ci-status origin/branch.
- Check remote CI status by commit SHA if you only have one: `hub ci-status <sha>`.
- Run `git ls-remote origin | grep <name>` to confirm the ref exists on the remote.
Example fix
// before hub ci-status feature-tyop # no such ref // after git fetch origin hub ci-status origin/feature-typo
Defensive patterns
Strategy: validation
Validate before calling
ref="origin/feature"
if ! git rev-parse --verify --quiet "$ref^{commit}" >/dev/null; then
git fetch origin || exit 1
fi
hub ci-status "$ref" Prevention
- Always `git fetch` before checking CI status of remote branches.
- Validate refs with `git rev-parse <ref>` before passing to hub.
- Use full branch names or SHAs rather than ambiguous short refs.
- Check `git ls-remote origin` when unsure a branch exists.
When it happens
Trigger: Running `hub ci-status <bad-ref>` where the ref doesn't exist: misspelled branch/tag, ref not fetched locally yet, abbreviated SHA too short or unknown, or an empty ref argument.
Common situations: Checking status of a remote branch before `git fetch`; typos in branch names; referring to a PR number without the right refs; running in a shallow clone or worktree missing the ref.
Related errors
- Error: %s/%s doesn't have a wiki
- the current branch '%s' doesn't seem pushed to a remote
- the branch to compare '%s' is the default branch
- the branch to compare '%s' is the same as --base
- 'create' must be run from inside a git repository
AI-assisted analysis of mislav/hub@5c547ed804 (2026-09-01).
Data as JSON: /api/errors/ec79dd8ea2a8883c.
Report an issue: GitHub.