fix: add reftable HEAD migration hint#1755
Open
puneetdixit200 wants to merge 1 commit into
Open
Conversation
spenserblack
approved these changes
May 21, 2026
Collaborator
spenserblack
left a comment
There was a problem hiding this comment.
I think it would've been better to match on the gix error, so that cheap pattern and value matching could be done instead of string matching on error messages.
But overall this is good enough IMO.
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.
Related to #1743.
This adds a targeted hint for the reftable placeholder failure discussed in the issue. When the commit traversal error chain shows
HEADresolving throughrefs/heads/.invalidorReference name cannot start with a dot, onefetch now keeps the original error chain and adds a concrete recovery step:This does not try to implement reftable support in onefetch. It just turns the current low-level
gixfailure into an actionable message while that support is still pending upstream.Tests cover both the reftable-style error chain and an unrelated error that should not receive the hint.
Checks run locally:
rustfmt --check src/info/mod.rsCARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo test info::tests::test_add_reftable_head_hint --libCARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo test test_display_head_refs --libCARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo test --test repo test_repo -- --exactCARGO_HOME=$PWD/.cargo-home CARGO_TARGET_DIR=$PWD/target cargo clippy --lib -- -D warnings