Repository navigation
Conversation
fetch_all_from_remote's check for an empty remote was inverted: it raised only when the remote was empty, and silently ignored every other fetch failure. Ignore only the "couldn't find remote ref HEAD" error that git (and cinnabar) report for an empty repository, and let other errors propagate. The check was added in 6a80f4e ("fix: handle empty repo"), and inverted in 491720b (mozilla-conduit#26, "Automatically retry actions that touch the network"), presumably by mistake: retry() only retries on exceptions, so swallowing the errors also defeated the retries. Do this check inside the retried callable, so an empty remote isn't retried, and drop the now-redundant retry around fetch_all_from_remote in _ensure_cinnabar_metadata, which would otherwise nest with the inner one. In verbose mode, stderr is streamed to the log, so it wasn't included in the GitCommandError and the empty-remote check couldn't work: collect it and pass it to proc.wait().
jcristau
marked this pull request as ready for review
October 15, 2026 06:56
Member
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fetch_all_from_remote's check for an empty remote was inverted: it raised only when the remote was empty, and silently ignored every other fetch failure. Ignore only the "couldn't find remote ref HEAD" error that git (and cinnabar) report for an empty repository, and let other errors propagate.
The check was added in 6a80f4e ("fix: handle empty repo"), and inverted in 491720b (#26, "Automatically retry actions that touch the network"), presumably by mistake: retry() only retries on exceptions, so swallowing the errors also defeated the retries.
Do this check inside the retried callable, so an empty remote isn't retried, and drop the now-redundant retry around fetch_all_from_remote in _ensure_cinnabar_metadata, which would otherwise nest with the inner one.
In verbose mode, stderr is streamed to the log, so it wasn't included in the GitCommandError and the empty-remote check couldn't work: collect it and pass it to proc.wait().