Skip to content

Use git provider tarball download as default way to download git repos#157

Merged
bycruz merged 5 commits intomasterfrom
new-git-system
Apr 28, 2026
Merged

Use git provider tarball download as default way to download git repos#157
bycruz merged 5 commits intomasterfrom
new-git-system

Conversation

@bycruz
Copy link
Copy Markdown
Collaborator

@bycruz bycruz commented Apr 28, 2026

Most git providers, like GitHub, GitLab, Gitea, etc, provide urls to download a tarball of the source contents of a repository.
This is a much faster download than using git.

Additionally, this PR forces every use of a git repo to be pinned to a commit, using libgit2's lsRemote functionality. Simpler and safer than trying to maintain a "latest" repo with an untagged commit and updating that.

If the git url is not recognized to be GitHub/GitLab/is unsupported, it'll fall back to using git again.

Resolves #151

Breaking change

This will not clone submodules. I've made the decision to no longer support them. It should be up to your build.lua script to grab what is necessary to build your project, or you could provide a tarball of a prebuilt output folder and tell users to use that.

That, or you can check the code into your repo.

I would've liked to keep support, but it seems impossible without cloning git history to be done properly, pinning the submodule's commit to the proper recorded one.

Before

image

After

image

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 28, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
lde ac025ea Commit Preview URL

Branch Preview URL
Apr 28 2026, 08:20 AM

@bycruz
Copy link
Copy Markdown
Collaborator Author

bycruz commented Apr 28, 2026

This CANNOT not be merged until

https://github.com/lde-org/deflate-sys
https://github.com/lde-org/git2-sys
https://github.com/lde-org/curl-sys

are not using submodules.

bycruz added 4 commits April 27, 2026 22:09
Also fix the test by actually resolving the latest commit and ensuring
output is equal
This will be used to faciliate build.lua scripts
@bycruz bycruz marked this pull request as ready for review April 28, 2026 08:20
@bycruz
Copy link
Copy Markdown
Collaborator Author

bycruz commented Apr 28, 2026

Should pass when merged

@bycruz bycruz merged commit 4cfb5e3 into master Apr 28, 2026
1 of 8 checks passed
@bycruz bycruz deleted the new-git-system branch April 28, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make git clones faster

1 participant