-
-
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
Archive/Download do not include LFS files or Submodules #4773
Comments
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. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
Are there any updates, fixes or thoughts on how to approach this issue? We would love to use Gitea and its API to download releases directly onto deployment servers and end users, but Gitea not including any LFS objects to the downloads is a huge problem. Using git to clone the repository is not an option as we cannot mandate our customers to install any extra software. |
So there is at least now a Could you give me some information as to how you create the zips - I don't immediately know where to look to find the code that creates them. |
#7209 might be related |
@schmittlauch I'm not certain. I would have to dive to see how these zips are created. My suspicion is that these zips do not even attempt to dereference the LFS pointers whereas on #7209 your problem is different. |
OK so yeah #7209 is not relevant to this. The issue is that we use |
And how github archive did that? |
I suspect they rewrote the command. Back in November 2018 git-lfs/git-lfs#1322 (comment) states that they didn't include lfs files (and likely submodules) in their zips. I think that's what we're going to have to do unfortunately. |
This again leads to the slightly annoying issue whereby we don't know what files are LFS files except by reading them and checking if they're a pointer or not. Similarly we need to do this zipping in the context of the current user and repository. In the case of submodules - it's conceivable that the zip that one user downloads may not be the same as the zip another user gets - I guess that's ok but it means caching these might be difficult unless we cache them with the associated permission state. Finally we must be very careful indeed about which submodules we're happy to include, if any - perhaps just allow those that are local to the gitea instance? |
Just wanted to add my two cents to this conversation. |
I know it wouldn't be as fast as |
Gitea checking out the repository is not a good idea. |
There is a wrapper around git archive that would allows to at least handles submodules. Maybe gitea could use it ? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
AFAIK github does not solve this. The archive you get from github may include LFS but not submodules. Release archives published on github are created and uploaded by the developer to include the submodules. If no release archive is uploaded by the developer submodules are not included. It is probably possible to automate with github actions. |
@hramrach |
Is gitea planning to add this feature to the plans? When release zip version, it's filled with LFS links, which greatly affects usability. |
[x]
):Description
With git-lfs installed and enabled on both the gitea server host and the client host, LFS controlled files do not get added properly to the .zip or .tar.gz files when:
Instead of the expected file in the .zip or .tar.gz, a text file of the same name is placed in the file.
The rest endpoint also functions in the same way.
In other respects, git-lfs works as expected when using git command line to interact with the repo.
Screenshots
Text files look like this:
The text was updated successfully, but these errors were encountered: