gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
921 stars 63 forks source link

Error "reference delta not found" when cloning repositories #118

Closed michelzanini closed 1 year ago

michelzanini commented 1 year ago

git-xargs version What does git-xargs --version show? git-xargs version v0.1.5

Describe the bug Some Git repositories from Github are not cloning and failing with this message:

[git-xargs] DEBU[2023-04-05T10:25:58-03:00] Error cloning repository                      Error="reference delta not found" Repo=repository-name-goes-here

It seems to happen on repositories with a large git history. There's seems to be a bug on the go-git library about this:

https://github.com/go-git/go-git/issues/495

I wonder if there's anything that can be done here, maybe use the latest version of go-git to see if its fixed?

Thanks.

zackproser commented 1 year ago

Hi @michelzanini - thanks for reporting this. I certainly haven't run into this one yet myself, which might make it difficult for me to reproduce the issue.

Can I ask if you pull in the latest version of go-git as you suggest, does it make a difference for your error? If a version bump of go-git is all that's needed then anyone can open that PR! I'm a bit buried right now to be honest so it's going to be a while until I can put some more focus here.

Thanks!

bloudraak commented 1 year ago

I ran into the same problem, upgraded go-git to v5.6.1, and confirmed I no longer had an issue with the updated go-git.

I submitted a PR with the relevant changes.

zackproser commented 1 year ago

Thank you @michelzanini and @bloudraak for the issue and assistance and for opening a PR!

@bloudraak because your PR required me to resolve some conflicts in your fork which I didn't have access to, I opted to make the same change myself in the interest of getting this fix out more quickly.

https://github.com/gruntwork-io/git-xargs/releases/tag/v0.1.7