WIP: Handle Cargo Git configuration prefixes in shallow fetches #667

Draft
erikinkinen wants to merge 0 commits from fix/cargo-shallow-fetch-prefix into feature/source-input-offline-execution
Owner

Cargo can place Git configuration pairs before fetch. The shallow-cache adapter treated those calls as ordinary commands, so valid shallow dependencies produced a warning and left the requested branch absent. Preserve the literal configuration prefix and apply --update-shallow to the fetch command in the fresh Cargo cache.

Refs #652; depends on #662.

  • Preserve prefix order, quoting, empty arguments, streams and exit status; forward non-fetch and incomplete calls unchanged.
  • Pass the genuine shallow-source round trip on Cargo 1.90 and 1.102; preserve original shallow boundaries.
  • Pass the complete shallow-transport suite and renew the complete helper declaration and caller binding.
  • Complete CI on this revision.

The native ownership helper bodies are unchanged. Complete source export, native build and guest acceptance remain separate gates.

Cargo can place Git configuration pairs before `fetch`. The shallow-cache adapter treated those calls as ordinary commands, so valid shallow dependencies produced a warning and left the requested branch absent. Preserve the literal configuration prefix and apply `--update-shallow` to the fetch command in the fresh Cargo cache. Refs #652; depends on #662. - [x] Preserve prefix order, quoting, empty arguments, streams and exit status; forward non-fetch and incomplete calls unchanged. - [x] Pass the genuine shallow-source round trip on Cargo 1.90 and 1.102; preserve original shallow boundaries. - [x] Pass the complete shallow-transport suite and renew the complete helper declaration and caller binding. - [ ] Complete CI on this revision. The native ownership helper bodies are unchanged. Complete source export, native build and guest acceptance remain separate gates.
erikinkinen added this to the Alpha 1 milestone 2026-11-10 11:04:39 +01:00
Cargo can supply leading Git configuration pairs before fetch. Preserve those literal arguments and apply the existing shallow-cache option to the actual fetch command, so a fresh Cargo cache can receive its selected shallow source without changing original history.
Bind the full original helper graph to the corrected literal Cargo Git route.
build: Bind callers to the shallow Git route correction
Some checks failed
Markdown / markdown (push) Successful in 24s
CI / cargo_publications (pull_request) Has been skipped
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
CI / cargo_publications (push) Failing after 4m25s
CI / rust (push) Failing after 4m40s
CI / native_sources (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
Coreutils provider graph / coreutils (push) Successful in 5m31s
b431f629b5
Select the complete declared source cohort in all original callers while preserving the native ownership interface.
Some checks failed
Markdown / markdown (push) Successful in 24s
CI / cargo_publications (pull_request) Has been skipped
CI / rust (pull_request) Has been skipped
CI / native_sources (pull_request) Has been skipped
CI / host_zero (pull_request) Has been skipped
CI / host_one (pull_request) Has been skipped
CI / host_two (pull_request) Has been skipped
CI / host_three (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
Coreutils provider graph / coreutils (pull_request) Has been skipped
Markdown / markdown (pull_request) Has been skipped
CI / cargo_publications (push) Failing after 4m25s
CI / rust (push) Failing after 4m40s
CI / native_sources (push) Has been skipped
CI / host_zero (push) Has been skipped
CI / host_one (push) Has been skipped
CI / host_three (push) Has been skipped
CI / host_two (push) Has been skipped
CI / integration (push) Has been skipped
Coreutils provider graph / coreutils (push) Successful in 5m31s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'fix/cargo-shallow-fetch-prefix:fix/cargo-shallow-fetch-prefix'
git switch 'fix/cargo-shallow-fetch-prefix'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'feature/source-input-offline-execution'
git merge --no-ff 'fix/cargo-shallow-fetch-prefix'
git switch 'fix/cargo-shallow-fetch-prefix'
git rebase 'feature/source-input-offline-execution'
git switch 'feature/source-input-offline-execution'
git merge --ff-only 'fix/cargo-shallow-fetch-prefix'
git switch 'fix/cargo-shallow-fetch-prefix'
git rebase 'feature/source-input-offline-execution'
git switch 'feature/source-input-offline-execution'
git merge --no-ff 'fix/cargo-shallow-fetch-prefix'
git switch 'feature/source-input-offline-execution'
git merge --squash 'fix/cargo-shallow-fetch-prefix'
git switch 'feature/source-input-offline-execution'
git merge --ff-only 'fix/cargo-shallow-fetch-prefix'
git switch 'feature/source-input-offline-execution'
git merge 'fix/cargo-shallow-fetch-prefix'
git push origin 'feature/source-input-offline-execution'
Sign in to join this conversation.
No description provided.