-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Merging pull requests on repository with LFS not working #4463
Comments
Have you installed git-lfs on your sever? |
Yes. |
After I add |
Did you solve this issue? I am facing it as well. |
Nope. Tagged as a bug. Waiting for a fix. |
@severgun thanks |
I'm getting the following error log when merging a pull request with LFS:
I'm using Gitea on Windows. |
same problem. any solution? |
same problem.
gitea.log
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
same problem |
1 similar comment
same problem |
Which version of Gitea are you using? |
Gitea Version: 1.7.1 |
Ok, so we updated to 1.8.1 but the issue is still present. |
Now I am willing to bet that you have git-lfs version greater than 2.3.4 installed on your server and gitea user has a .gitconfig file containing: [filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true If you remove that that should act as a workaround.
|
|
|
OK, I think I've looked at this a bit more I think this is due to us previously cloning without setting --shared and without adding an alternative object dir reference for the pulled branch. What doesn't make sense though is that @Begounet has reported this on 1.8.1 - which also shouldn't be cloning without shared repository settings... @Begounet I wonder can you reproduce this on master? What is your version of git lfs? Mine is:
|
This issue is not related to the version of git-lfs. local-repo/merge-xxxxx.git/.git:
Also, I don't think it's a good idea to download the LFS file to the local temp folder and merge the PR. |
@yasuokav it might actually be related to LFS version. For example prior to 11 months ago git LFS would definitely fail on multiple alternative repositories. I don't get this problem on 2.3.4 and I know git-lfs changed their handling of local clones at some point - likely around 2.6. So if you're experiencing this bug would you please tell me what your server's version of git-lfs is? I suspect it is highly pertinent. Now, I agree that I'm not certain that grabbing the LFS objects in order to do a merge is a good idea. I will look at stopping this. If you are experiencing this bug there are a couple of things I would like to know:
So that's 3 questions but the git-lfs version question is pertinent. So please tell me. |
|
Cool. I can check if I can reproduce this with 2.4 - (looking at the release information for 2.4 they rewrote their file API at that point so that's highly suspicious.) Ok. In terms of quick fix for this I would guess that the most sensible thing is for Gitea to have its own .gitconfig in which LFS is not installed. Either that or determine a way to commit without running filters. The correct answer is to change to an index based merging style - then filters etc don't matter as we determine what goes in to the index. You shouldn't be experiencing this bug on repo edit, or upload is because I rewrote these sections to do their work directly with the index. |
But this at least finally gives those of you experiencing this bug a workaround until I get a fix in. |
Sorry this has taken so long to figure out. |
OK, I've finally had a chance to download git-lfs 2.4.0 and git-lfs 2.7.2 and I still can't reproduce this. If you can work out a minimal testcase that breaks for you I can try to replicate and figure out exactly what's causing the breakage, however what I might do is add a note to the troubleshooting page. |
I also think we should mark this as a duplicate of #732 |
[x]
):Description
Merging pull requests from web interface not working on repository with LFS.
I can commit, merge and push branches on local machine with git CLI or Github for Windows, but not in gitea web.
Web Interface just fall to error 500 page after pressing Merge button.
Gitea.log:
Seems like something related to lfs.url on server side, but what and how to fix?
The text was updated successfully, but these errors were encountered: