-
Notifications
You must be signed in to change notification settings - Fork 788
empty git-upload-pack given
errors since v5.4.0
#328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this should be fixed following the merging of #329 |
Can you test this against the new v5.4.2? |
Based on fluxcd/image-automation-controller#176 (comment), this does not seem to have been the cause. |
looking at the MR, we are facing this issue with a basically fresh repo, single branch, ~10 super simple yaml files, nothing really big in any way |
I think this can be closed now? |
@zeripath I still get this error with v5.4.2 With the following scenario:
Currently running v5.3.0 as a workaround, where this works. |
Ok then I don't think this can be related to my changes. If you have a specific and repeatable test case you could try to bisect? |
Same problem here, first clone went ok, same problem when doing subsequent pull/fetch |
same here |
1 similar comment
same here |
@zeripath The following test fails with
|
The issue started with 320db9a Works before
Fails afterwards:
|
Have the same issue greenpau/caddy-git#2 when using |
The Lines 73 to 82 in a5bbcd2
The Lines 463 to 465 in a5bbcd2
The Lines 547 to 550 in a5bbcd2
The go-git/plumbing/transport/common.go Lines 74 to 84 in a5bbcd2
The go-git/plumbing/transport/http/upload_pack.go Lines 35 to 41 in a5bbcd2
The go-git/plumbing/protocol/packp/uppackreq.go Lines 41 to 45 in a5bbcd2
🤔 should we modify |
More info: This change prevents an attempt to upload pack when UploadPackRequest is empty. Partial Resolution: go-git#328 Signed-off-by: Paul Greenberg <greenpau@outlook.com>
Got same issue. I have to downgrade to v5.3.0, what's the progress now? |
I also have the same issue, v5.3.0 seems to work but I'm worried about using an older version. Is there any kind of workaround? |
Yes, but limiting depth is super useful and I need it. If I don’t specify depth my program is way slower. |
Same here. |
I wasn't specifying Depth on the Pull(), but was on the initial Clone() and get this error on any subsequent Pull(). If I remove specifying Depth on the Clone(), the Pull()s work fine. This is not ideal for me since my service is useless until the initial clone is complete and making it shallower reduces that time. The repo I'm working with has a very long (and mostly irrelevant) history, so I was trying to limit that initial transfer. I just need the last couple weeks of changes at a given point in time. |
More info: This change prevents an attempt to upload pack when UploadPackRequest is empty. Partial Resolution: go-git#328 Signed-off-by: Paul Greenberg <greenpau@outlook.com>
Hey team, what is going on here? Are we not going to fix this? |
…go-git#328 Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
plumbing: packp, A request is not empty if it contains shallows. Fixes #328
These changes did end up fixing the issue I was having in one of my repos. Any chance we could get a new version tagged release so we can Thanks in advance, go-git team. |
@taigrr The version |
Using Version Hey, I think there may still be an issue here. It appears that this fails if I don't specify a The reason this is valuable is that specifying Let me know if I'm misunderstanding something. The following script reproduces the issue by panic'ing on the error from
|
@pjbgf I took a look and this case is different to what I fixed. This is trying to unshallow a repo after it was cloned as shallow. If you add this code to the end of
It seems we are only handling shallow commits if we are requesting a depth greater than 0, so it fails if we try to unshallow our clone. In
to
However it seems we don't update the existing list of shallows correctly (ie remove commits that are no longer shallow) during Any chance you can take a look? |
@AriehSchneier I will try to take a look at it later on this week. In the meantime, will re-open this issue. |
@AriehSchneier I had an initial look at this, by shallow cloning the repo then unshallowing it:
On the fetch (trying to unshallow),
Which means it would not receive the
|
@williambanfield Just wanted to call out on your example that you probably want to add |
Still getting this error when going a clone with a depth specified, then running |
I just ran into this today |
If we have all what we asked for, finish the session and handle error. This is equivalent of git "Already up to date." message. Fixes: go-git#328 Fixes: go-git#638
If we have all what we asked for, finish the session and handle error. This is equivalent of git "Already up to date." message. Fixes: go-git#328 Fixes: go-git#638 Fixes: go-git#157
If we have all what we asked for, finish the session and handle error. This is equivalent of git "Already up to date." message. Fixes: go-git#328 Fixes: go-git#638 Fixes: go-git#157
…go-git#328 Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
…llows plumbing: packp, A request is not empty if it contains shallows. Fixes go-git#328
If we have all what we asked for, finish the session and handle error. This is equivalent of git "Already up to date." message. Fixes: go-git#328 Fixes: go-git#638 Fixes: go-git#157
We are extensive consumers of this library and besides the issue reported in #323, we have seen an increase of
empty git-upload-pack given
errors reported by our users since we upgraded fromv5.3.0
tov5.4.x
.The error seems unrelated to the Git v2 protocol as reported in #64 or #157, given users that previously were able to perform operations on their e.g. GitHub repository using
v5.3.0
are now no longer able to do so usingv5.4.x
.Diving into the changelog nothing directly related seems to have changed, except for some plumbing changes in #246.The text was updated successfully, but these errors were encountered: