Repository navigation
Fix git checkout long paths - #17752
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @weihanglo (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. |
There was a problem hiding this comment.
@dhivadhiva please read our contribution guide and LLM policy. PR should have description and all non-code communication must be written by human
|
Reminder, once the PR becomes ready for a review, use |
|
I've updated the PR description and reviewed the contribution guidelines and LLM policy. I've also checked the implementation and tests. Please take another look when you have time. Thank you for the feedback!@rustbot ready. @weihanglo |
| t!(t!(subrepo.config()).set_bool("core.longpaths", true)); | ||
| t!(subrepo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")); | ||
| let mut origin = t!(subrepo.find_remote("origin")); | ||
| t!(origin.fetch(&Vec::<String>::new(), None, None)); | ||
| t!(subrepo.checkout_head(None)); | ||
| t!(submodule.add_finalize()); |
There was a problem hiding this comment.
Actually I think we should not use t! macro and just unwrap. It adds little to no values.
I would personally suggest we remove that t! macro in a separate PR.
…m lines rust-lang/cargo#17752 and seraphis-migration/monero#509 merged on 18 Nov and google/crubit#3027 on 17 Nov. The bio, the upstream array and the known associates now list Rust, Crubit and Rune; the generated table picks the merges up on its own.
Update cargo submodule 28 commits in f93c676e3e7ab1aee08dc95d869700f6b99a1a20..ae8f06eb41b8c4a534d0f280f1b9d287f45ead73 2026-11-15 17:27:10 +0000 to 2026-11-21 04:06:35 +0000 - feat(cargo-util-config): expose config loader (rust-lang/cargo#17781) - feat(config): Add IncludeConfig (rust-lang/cargo#17782) - fix(config): `--config` use same layers merge as config files (rust-lang/cargo#17780) - refactor(config): Move include removal up a layer, making include_paths (rust-lang/cargo#17776) - Support wasm64-unknown-emscripten (rust-lang/cargo#17620) - fix(context): merge files and `--config` as layers (rust-lang/cargo#17775) - fix(config)!: Really ensure no comments are present (rust-lang/cargo#17774) - fix(config): list unmerged config in precedence order (rust-lang/cargo#17773) - fix(config): Handle parsing dotted keys using TOML keys (rust-lang/cargo#17770) - fix(config): Improve config schema by implementing Serialize (rust-lang/cargo#17762) - fix(config): drop redundant config merge error context (rust-lang/cargo#17769) - fix(config): keep winning definition for non-mergeable list (rust-lang/cargo#17766) - test(build-analysis): update for new section timing order (rust-lang/cargo#17767) - docs(ref): Deprecate 'workspace.package.authors' (rust-lang/cargo#16951) - Fix git checkout long paths (rust-lang/cargo#17752) - fix(config): layer loads to work the same as merged load (rust-lang/cargo#17761) - refactor(config): Switch another location to `resolve` (rust-lang/cargo#17760) - refactor(config): Cleanup IncludeConfig by adding ConfigParentRelativePath (rust-lang/cargo#17759) - docs(lints): Remove nonexistent lints from cargo::default desc (rust-lang/cargo#17757) - Add period to cargo-toml-vs-cargo-lock.md for clarity. (rust-lang/cargo#17754) - fix(config)!: Be more explicit about what ConfigRelativePaths are relative to (rust-lang/cargo#17751) - Fix ‘dependencoes’ typos (rust-lang/cargo#17753) - refactor(credential)!: replace time with `[email protected]` (rust-lang/cargo#17750) - refactor(context): miscellaneous loader cleanup (rust-lang/cargo#17747) - docs(profiles): fix outdated default (rust-lang/cargo#17748) - chore(config): migrate Renovate config (rust-lang/cargo#17746) - refactor(context): a `ConfigLoader` type (rust-lang/cargo#17745) - refactor: modernize with 1.100 API (rust-lang/cargo#17728)
Update cargo submodule 28 commits in f93c676e3e7ab1aee08dc95d869700f6b99a1a20..ae8f06eb41b8c4a534d0f280f1b9d287f45ead73 2026-11-15 17:27:10 +0000 to 2026-11-21 04:06:35 +0000 - feat(cargo-util-config): expose config loader (rust-lang/cargo#17781) - feat(config): Add IncludeConfig (rust-lang/cargo#17782) - fix(config): `--config` use same layers merge as config files (rust-lang/cargo#17780) - refactor(config): Move include removal up a layer, making include_paths (rust-lang/cargo#17776) - Support wasm64-unknown-emscripten (rust-lang/cargo#17620) - fix(context): merge files and `--config` as layers (rust-lang/cargo#17775) - fix(config)!: Really ensure no comments are present (rust-lang/cargo#17774) - fix(config): list unmerged config in precedence order (rust-lang/cargo#17773) - fix(config): Handle parsing dotted keys using TOML keys (rust-lang/cargo#17770) - fix(config): Improve config schema by implementing Serialize (rust-lang/cargo#17762) - fix(config): drop redundant config merge error context (rust-lang/cargo#17769) - fix(config): keep winning definition for non-mergeable list (rust-lang/cargo#17766) - test(build-analysis): update for new section timing order (rust-lang/cargo#17767) - docs(ref): Deprecate 'workspace.package.authors' (rust-lang/cargo#16951) - Fix git checkout long paths (rust-lang/cargo#17752) - fix(config): layer loads to work the same as merged load (rust-lang/cargo#17761) - refactor(config): Switch another location to `resolve` (rust-lang/cargo#17760) - refactor(config): Cleanup IncludeConfig by adding ConfigParentRelativePath (rust-lang/cargo#17759) - docs(lints): Remove nonexistent lints from cargo::default desc (rust-lang/cargo#17757) - Add period to cargo-toml-vs-cargo-lock.md for clarity. (rust-lang/cargo#17754) - fix(config)!: Be more explicit about what ConfigRelativePaths are relative to (rust-lang/cargo#17751) - Fix ‘dependencoes’ typos (rust-lang/cargo#17753) - refactor(credential)!: replace time with `[email protected]` (rust-lang/cargo#17750) - refactor(context): miscellaneous loader cleanup (rust-lang/cargo#17747) - docs(profiles): fix outdated default (rust-lang/cargo#17748) - chore(config): migrate Renovate config (rust-lang/cargo#17746) - refactor(context): a `ConfigLoader` type (rust-lang/cargo#17745) - refactor: modernize with 1.100 API (rust-lang/cargo#17728)
Fix #13020 git checkout long paths
Motivation behind this change
This PR fixes the bug where git checkout fails or behaves incorrectly when dealing with very long file paths. It ensures that long paths are handled correctly during checkout operations, preventing errors and ensuring repository integrity for issue #13020.
Notes to reviewers
Manual testing performed: Tested checkout of repositories containing files with path lengths exceeding standard limits (e.g., 256 characters on Windows) to ensure files are correctly created and accessible after checkout. Verified no regression in short-path scenarios.
Automated tests: Added/updated unit tests to cover edge cases for long path handling in the checkout logic.
PR involvement - How an LLM was used in preparing this change
Claude Code assisted me while writing and testing the Changes