Skip to content
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

Regression between 0.2.0 and 0.2.1: git fetch -> bad line length character: PACK #33

Closed
gl-yziquel opened this issue May 27, 2024 · 4 comments

Comments

@gl-yziquel
Copy link

gl-yziquel commented May 27, 2024

Hi.

I determined, recently, that a buggy behaviour of legit was due to a regression between 0.2.0 and 0.2.1.

Problematic behaviour on 0.2.1:

mini-me@virtucon ~/h/c/l/just.d (master)> git fetch --all
fatal: protocol error: bad line length character: PACK

legit is the server serving these git repos.

Correct behaviour on 0.2.0:

mini-me@virtucon ~/h/s/m/just.d (master)> git fetch --all
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 43 (delta 22), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (43/43), 16.11 KiB | 485.00 KiB/s, done.
From https://goldmember.virtucon.evil/legit/mud-just
   05863f5..a0b7332  master     -> origin/master

Current behaviour on 0.2.2 is still buggy.

The reason seems linked to the following note in the following release:

Release: https://github.com/icyphox/legit/releases/tag/v0.2.1

The git executable is no longer required in PATH as git-upload-pack is now implemented using go-git

That same error pops up sporadically: src-d/go-billy#11

@gl-yziquel
Copy link
Author

gl-yziquel commented May 28, 2024

Seems @prologic had the same issue. Here's an unsolved issue in the go-git issue tracker:

go-git/go-git#647 (comment)

And here is a pin of legit on v.0.2.0 that solves the issue by going back before the regression:

https://github.com/gl-yziquel/legit

@prologic
Copy link
Contributor

I was never able to solve this, despite the many suggestions and comments. See gitxt

@icyphox
Copy link
Owner

icyphox commented May 28, 2024

Hm, looks like the go-git git-upload-pack implementation is a source of constant annoyance. While I haven't run into the bug mentioned here, I am facing a perhaps related issue with UploadPack blowing up the stack and crashing every time someone tries to clone (see: go-git/go-git#1062). I think the intermediate fix until go-git gets their shit together would be to switch back to using the gitkit lib.

@icyphox
Copy link
Owner

icyphox commented Jul 13, 2024

@gl-yziquel Hi, I've tagged a new release that reverts back to using the system's git upload-pack. It of course, requires git to be in PATH. Let me know if this fixes it for you, and if not I'll re-open this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants