Repository navigation
fix(core): read git 2.55's quoted -L paths and keep the partial-clone hint - #9
Merged
Merged
Conversation
… hint Two tests went red on CI when the runners moved to git 2.55.0, and both were the product's, reproduced with a local build of that git: - `log -L` now prints historical paths in the standard quoted form, and a name with a space ends its `---`/`+++` label with a tab (diff.c), which the header decoder did not strip: the quoted name then failed to unquote, the record was undecodable, and the step vanished from a symbol's history. The tab is dropped before unquoting; a name never ends in one. - The partial-clone hint keyed on git's wording, "could not fetch <oid> from promisor remote", which 2.55 no longer prints for a cat-file (it says "bad file", as for a corrupt repository; other commands moved to their own words). The runner now decides: when a command fails over a missing object, it asks the repository whether it names a promisor remote, and `GitError::Failed` carries the answer. A corrupt repository is not called a partial clone, and the probe runs only on such failures. `names_a_missing_object` lists the wordings; the decoder test covers the tabbed labels, quoted and not, and a unit test the hint's rule. The git suite passes under 2.43 and 2.55. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
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.
Summary
Two
clew-coregit tests have been red onmainsince the GitHub runners moved to git 2.55.0 (both the Linux and macOS test jobs). Both are the product's, reproduced with a local build of git 2.55.0 and fixed incrates/clew-core/src/git.rs:log -Lpaths are quoted now. git 2.55 prints historical paths in the standard C-quoted form, and a name containing a space ends its---/+++label with a tab (git'sdiff.c), which the header decoder did not strip. The quoted name then failed to unquote, the record was undecodable, and that step vanished from a symbol's history (a_newline_in_a_historical_path_neither_splits_nor_relabels_records).standard_header_pathnow drops the trailing tab before unquoting; a name never ends in one itself, since a raw tab is always quoted.The partial-clone hint keyed on git's wording. It looked for "could not fetch
<oid>from promisor remote", which 2.55 no longer prints for acat-file(it says "bad file", as for a corrupt repository;show,log -Landrev-parsemoved to their own words). The runner now decides: when a command fails over a missing object (names_a_missing_object), it asks the repository whether it names a promisor remote (remote.<name>.promisororextensions.partialClone), andGitError::Failedcarries the answer in a newpartial_clonefield. A corrupt repository is not called a partial clone, and the probe runs only on such failures, so the normal path spawns nothing extra (a_partial_clone_never_fetches_through_its_remote).No fetch was ever attempted under 2.55 either (
GIT_NO_LAZY_FETCHstill holds); only the message had lost its explanation.Tests
Verification
git::tests under git 2.55.0 (local build)git::tests under git 2.43.0scripts/hermetic-test.shfor core, server, protocol under git 2.55.0cargo clippy --all-targets -- -D warnings(core, server)cargo doc --document-private-itemswith-D warnings(core, server)cargo fmt --all -- --check🤖 Generated with Claude Code
https://claude.ai/code/session_01WRJ4sDknvQJ86tFvGydgpf
Generated by Claude Code