-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
[3681303439] Upstream Reporter: Christian Heimes
Upstream description:
Fromager's [gitutils.git_clone](https://github.com/python-wheel-build/fromager/blob/main/src/fromager/gitutils.py) feature does not behave like pip's [VCS support](https://pip.pypa.io/en/stable/topics/vcs-support/). Our helper is less powerful, harder to use, slower, and does not cover all use cases.
The major differences are:
- pip uses blobless partial clones, https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ . This is much more efficient than a full clone, because it only downloads commit history and trees, not file blobs.
- we have separate arguments for refs and tags, which makes the API more awkward to use
- pip always fetches submodules recursively.
We can make our clone API faster and easier to use:
- clone with blob filter and `--no-checkout`
- `git checkout
Unknown macro: {ref}`, which can be any git reference like tag, branch, ref, or commit
- update submodules recursively with a blob filter
That would reduce the argument list to three arguments (output directory, clone url, ref) and remove the need for `git_options` in PBI.
- links to