Add a sparse-checkout option to git repository rules #24069
Labels
help wanted
Someone outside the Bazel team could own this
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: feature request
Description of the feature request:
Hi there! I'm requesting that git_override (in bzlmod) be expanded to add a sparse-checkout option. This could be done relatively easy with a custom repository rule back with Workspace, but now with bzlmod I'm hoping to not have to use a module extension to achieve this.
https://bazel.build/rules/lib/globals/module#git_override
Which category does this issue belong to?
External Dependency
What underlying problem are you trying to solve with this feature?
I am dealing with a very large repository, and using the current git_override rule is not feasible.
Which operating system are you running Bazel on?
n/a
What is the output of
bazel info release
?n/a
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.n/a
What's the output of
git remote get-url origin; git rev-parse HEAD
?Have you found anything relevant by searching the web?
I found #13747 that requests a similar feature for git_repository.
Any other information, logs, or outputs that you want to share?
I don't believe this would be too difficult. The additional inputs would be a list of repository paths to checkout (passed down to git). We would also have to enforce the system's git is a minimum version. I'd be happy to take a stab at it myself if someone could confirm this as a valuable addition and point me to the code to modify.
The text was updated successfully, but these errors were encountered: