-
-
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
[git lfs] web interface displays lfs metadata instead of real file #7209
Comments
First of all LFS is not available on try.gitea.io. That's why the push fails there. |
Ok so assuming that your Gitea is actually running as an LFS server. This should not be happening. Let's look at view.go the rendering of a file is handled: Lines 207 to 216 in 76e8eec
Where it opens a blob and then reads some of it in to a buffer checking if it's a text file: Lines 226 to 230 in 76e8eec
If it's a text file and LFS is enabled it will try to see if it matches an LFS file: Lines 234 to 248 in 76e8eec
And then will switch to use that LFS files contents. So you should never see the LFS pointer once it has matched. |
Lines 89 to 105 in 76e8eec
|
Ok now we have the code context we can try to work out what's going wrong. Clearly your file above is a text file that appears to be an LFS pointer file. So that leaves 2 possibilities:
So are you sure you've pushed your LFS file to Gitea? How did you get your LFS file into this repository? Was it through a merge from a fork? There's a corollary issue to #732 whereby if you can merge prs with LFS files, those LFS files will not be associated with the base repository. This will be finally fixed by #7082. My WIP pr #7199 will add some LFS management features to the repository settings - allowing you to search a repository for missing LFS files. |
I ran into an interesting edge case: First of all, git lfs was not enabled on my gitea instance. Sorry, my bad, i wasn't aware of the necessity of manually enabling it. Closing this as I'm not sure whether gitea can do anything about this, it's probably more of a git lfs bug/ quirk. |
Yeah unfortunately there's no way for Gitea to divine where you stored your LFS files as far as I understand it. I don't think it's ever sent across with a push. |
[x]
):Description
For repositories containing files stored in git lfs buckets, the gitea web interface does not display the actual file but only the intermediate metadata file of git lfs.
Screenshots
The text was updated successfully, but these errors were encountered: