-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
sub-branches throw 500 #9938
Comments
@ThierryBegin Could you confirm v1.10.3 still has the problem? |
hard to tell, Ill have to find a way to update it in the jail I guess, which isn't simple. |
@ThierryBegin updating gitea should be easy - do you have custom modifications ?!? |
@ThierryBegin Did you create the branch from Gitea UI or Git CLI? |
can you enable develop mode and give us some logs? |
sure, |
I updated Freenas to 11.3 today and decided to try with the community plugin. I couldn't even create a repo until I added |
@ThierryBegin, @greg-ch could please confirm that:
For these test try to use only the UI (you can create files and branches from the UI no problem). |
@guillep2k
|
Have you deleted that branch? Cannot reproduce that on my local instance. |
Could it be FreeBSD related issue? |
Maybe it's a git version problem? Which version of git are you running? |
I will add that the sub-branch which is on my screenshots and which opens with 500. I created using git flow release .... on FreeBSD 12.1. |
By any chance your default branch for that repo is not |
The actual error from the log posted above is:
Could be an issue with the local git configuration if there is any (I also can't reproduce this but anybody should at least focus on the real error it's giving). |
if it helps, I think this is the git repo with all the install instructions that freebsd need to install the plugin afaik https://github.com/jaf-iocage-plugins/iocage-plugin-gitea |
Yet another question... 😄 You're trying to get branch
? Also, I get that you were able to reproduce with a repo from scratch. Could you please push that repo to |
._files are a feature of Macs - in particular directories viewed through Finder - neither Git nor Gitea makes them. |
Hmm, my workstation is under mac. I have no memories to open gitea data with mac Finder, but it's not impossible because in the past I did many test with docker in local with my gitea data (currently on my rasperry). thank you for your feedback ;) |
I can confirm seeing this in a fresh FreeBSD 12.1 jail with Gitea 1.11.3/Go 1.14.1/Git 2.26.1 -- I'll see if I can dig into it and figure out what's going on. |
Thx, keep us posted, in the meantime I switched to gitlab and it does works flawlessly except for the insane amount of memory it's taking even in idle. |
I've opened go-git/go-git#39, which resolves the underlying problem: given a branch name like I suspect this can be closed, as the problem lies elsewhere. edit: after-thought, unless Gitea maintainers can be convinced to import the fix if upstream accepts it. |
This fix has been accepted and merged upstream; the gist of the problem is that readReferenceFile() must check that what it's been requested to read isn't a directory. read() on a directory fd may work on some platforms (e.g. FreeBSD), so readReferenceFile() would previously succeed at the earliest point in a branch name (e.g. "feature" in "feature/myfeature") despite the fact that this isn't a branch ref but a directory. Fixes issue go-gitea#9938 Signed-off-by: Kyle Evans <[email protected]>
This fix has been accepted and merged upstream; the gist of the problem is that readReferenceFile() must check that what it's been requested to read isn't a directory. read() on a directory fd may work on some platforms (e.g. FreeBSD), so readReferenceFile() would previously succeed at the earliest point in a branch name (e.g. "feature" in "feature/myfeature") despite the fact that this isn't a branch ref but a directory. Fixes issue go-gitea#9938 Signed-off-by: Kyle Evans <[email protected]>
@kevans91 Since go-git/go-git#39 merged, could you send a PR and confirm this bug is fixed in FreeBSD? |
Hi, I sent a PR and was told it can't be merged until a release of go-git is cut that includes it. =( #11208 It does fix the problem on FreeBSD and I've got a patch for our ports system that we can carry locally with no real problem until a new release is made. |
An issue[0] was filed upstream in January that branches with a slash in their name (e.g. stable/11) result in a 500 error when attempting to view them. I tracked down the issue to the fact that read(2) on a directory fd in FreeBSD will actually succeed, while it will not on Linux/other OS. I have filed a PR[1] with go-git to remedy the problem there, and then we (hopefully) convince gitea maintainers to accept the patch as well once it's upstreamed. The attached patch brings it into the ports tree as well, so that FreeBSD users can more immediately get the fix. It should still apply to the version in 2020Q2, more or less, with version numbers changed to protect the innocent. [0] go-gitea/gitea#9938 [1] go-git/go-git#39 PR: 245863 Approved by: <stb lassitu de> (maintainer) Aoorived by: koobs (mentor, ports) MFH: 2020Q2 (minor bugfix patch) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@534921 35697150-7ecd-e111-bb59-0022644237b5
An issue[0] was filed upstream in January that branches with a slash in their name (e.g. stable/11) result in a 500 error when attempting to view them. I tracked down the issue to the fact that read(2) on a directory fd in FreeBSD will actually succeed, while it will not on Linux/other OS. I have filed a PR[1] with go-git to remedy the problem there, and then we (hopefully) convince gitea maintainers to accept the patch as well once it's upstreamed. The attached patch brings it into the ports tree as well, so that FreeBSD users can more immediately get the fix. It should still apply to the version in 2020Q2, more or less, with version numbers changed to protect the innocent. [0] go-gitea/gitea#9938 [1] go-git/go-git#39 PR: 245863 Approved by: <stb lassitu de> (maintainer) Aoorived by: koobs (mentor, ports) MFH: 2020Q2 (minor bugfix patch)
www/gitea: Fix viewing of branches with a slash in the name An issue[0] was filed upstream in January that branches with a slash in their name (e.g. stable/11) result in a 500 error when attempting to view them. I tracked down the issue to the fact that read(2) on a directory fd in FreeBSD will actually succeed, while it will not on Linux/other OS. I have filed a PR[1] with go-git to remedy the problem there, and then we (hopefully) convince gitea maintainers to accept the patch as well once it's upstreamed. The attached patch brings it into the ports tree as well, so that FreeBSD users can more immediately get the fix. It should still apply to the version in 2020Q2, more or less, with version numbers changed to protect the innocent. [0] go-gitea/gitea#9938 [1] go-git/go-git#39 PR: 245863 Approved by: <stb lassitu de> (maintainer) Aoorived by: koobs (mentor, ports) Approved by: ports-secteam (blanket: minor bugfix patch)
An issue[0] was filed upstream in January that branches with a slash in their name (e.g. stable/11) result in a 500 error when attempting to view them. I tracked down the issue to the fact that read(2) on a directory fd in FreeBSD will actually succeed, while it will not on Linux/other OS. I have filed a PR[1] with go-git to remedy the problem there, and then we (hopefully) convince gitea maintainers to accept the patch as well once it's upstreamed. The attached patch brings it into the ports tree as well, so that FreeBSD users can more immediately get the fix. It should still apply to the version in 2020Q2, more or less, with version numbers changed to protect the innocent. [0] go-gitea/gitea#9938 [1] go-git/go-git#39 PR: 245863 Approved by: <stb lassitu de> (maintainer) Aoorived by: koobs (mentor, ports) MFH: 2020Q2 (minor bugfix patch) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@534921 35697150-7ecd-e111-bb59-0022644237b5
So I believe that go-git 5.10 has this fix. |
yes I saw the upgraded version in freenas too . we can close this, thx guys!
|
Will do once the pr above is merged. |
[x]
):Description
I'm able to create a feature/nameoffeature branch but when I try to load it on gitea it throws 500 errors
...
Screenshots
The text was updated successfully, but these errors were encountered: