Repository navigation
Conversation
f00805a to
a125189
Compare
a125189 to
42e7be7
Compare
42e7be7 to
ad9a536
Compare
|
❌ Bazel docs preview deployment failed (Mintlify result: timed_out). Please check the GitHub Actions logs for details. Updated for |
git_repository keeps a complete checkout under .tmp_git_root and symlinks the selected strip_prefix entries into the repository root. Recursive package discovery can then see discarded sibling packages, and traversal or an escaping directory symlink can expose data outside the checkout. Complete Git operations before stripping, reject paths that escape the checkout or resolve into Git metadata, and move only the selected subtree into place. Remove discarded entries and .git, preserve add_prefix and patch behavior, and cover recursive queries, collisions, and escape cases. Fixes bazelbuild#26628.
macOS can use case-sensitive volumes, where .GIT/OBJECTS does not name the metadata directory created by Git. Selecting that spelling based on the OS makes the metadata-rejection check fail earlier with a missing-directory error. Use the uppercase spelling only when the fixture filesystem accepts it, retaining lowercase metadata coverage on case-sensitive volumes.
|
@meteorcloudy could you review this strip-prefix follow-up to #30309, which you reviewed and has now landed? It fixes discarded packages appearing in recursive discovery (#26628). — Codex, on Tamir’s behalf. |
ad9a536 to
69d2a0e
Compare
|
Looks good to me, thanks for fixing! :) I have one question - On very large repos deleting the discarded tree during Maybe adding something like this in the relevant doc:
|
strip_prefix removes unused checkout contents after Git has materialized them. Point users of large repositories to sparse_checkout_patterns to limit that work, and clarify that the patterns match paths in the original Git repository.
Yes. Added the The generated Git-rule docs build and formatting check pass. — Codex, on Tamir’s behalf. |
|
Thanks! :) |
|
@bazel-io flag |
|
Requesting backport of this fix to Bazel 9.3 (tagging #32219), current Bazel 9.x behaviour breaks when importing Git revisions as Rust dependencies (example) as Build cited uses Bazel 9.1, reproduced locally with Bazel 9.2. |
|
@bazel-io fork 9.3.2 |
|
@bazel-io fork 9.4.0 |
… (bazelbuild#33054) git_repository keeps a complete checkout under .tmp_git_root and symlinks the selected strip_prefix entries into the repository root. Recursive package discovery can then see discarded sibling packages, and traversal or an escaping directory symlink can expose data outside the checkout. Complete Git operations before stripping, reject paths that escape the checkout or resolve into Git metadata, and move only the selected subtree into place. Remove discarded entries and .git, preserve add_prefix and patch behavior, and cover recursive queries, collisions, and escape cases. Fixes bazelbuild#26628. — Description updated by Codex, on Tamir’s behalf. --------- Co-authored-by: Will Stranton <[email protected]> Co-authored-by: Tamir Duberstein <[email protected]>
git_repository keeps a complete checkout under .tmp_git_root and
symlinks the selected strip_prefix entries into the repository root.
Recursive package discovery can then see discarded sibling packages,
and traversal or an escaping directory symlink can expose data outside
the checkout.
Complete Git operations before stripping, reject paths that escape the
checkout or resolve into Git metadata, and move only the selected
subtree into place. Remove discarded entries and .git, preserve
add_prefix and patch behavior, and cover recursive queries, collisions,
and escape cases.
Fixes #26628.
— Description updated by Codex, on Tamir’s behalf.