Closed noxora closed 3 years ago
Hi, we've also noticed this issue on go-diff@v1.1.0
paired with go-git/v5@v5.1.0
: https://github.com/launchdarkly/ld-find-code-refs/issues/140
It looks like some changes were recently committed to potentially resolve this issue -- @sergi any chance you could release a new tag for the latest version so we could send it downstream?
Hi. Is there going to be a new release, as asked before ?
v1.2.0 has been released, apologies for the delay.
It might be better for me to bring this to go-git, but I'm unsure, so I figured I'd come here first
The above stack trace was the result of calling
change.Patch()
in go-git, which eventually calls y'all. The function is here, and you can switch to the master branch to step through the functions https://github.com/go-git/go-git/blob/db6c41c156481962abf9a55a324858674c25ab08/plumbing/object/change.go#L84 and I am confused because it seems that everything in both go-git and go-diff are using for loops on their input, so an empty input should just result in nothing happening and moving on.My project is a git hook trying to get some info about the additions being made to the repository, so it takes a list of git references, attempts to get the patches which lead from reference to the other, and get its info from the added text in those patches.
I have been told that the repository this failed on was previously a mirrored repository, which had its mirroring turned off after they decided to migrate to it. Additionally, the repository had it's master branch history rewritten once, but I don't believe either of these necessarily create this issue, although they make it hard to replicate.
It's worth noting that this is currently running on go-git 4.10.0 and go-diff 1.0.0, which I know are not the latest versions, but I have manually compared the versions as best I can, and the code surrounding this error doesn't seem to have changed.
I would really appreciate help diagnosing this issue, and if there's any way I can help, please let me know, although I feel stuck at the moment