-
Notifications
You must be signed in to change notification settings - Fork 229
Support git-lfs files in the lib directory #1433
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
Comments
Can you go into more detail about what exactly is going wrong? Why doesn't the clone preserve the LFS target URL? I would like to solve this, but I don't think manually copy-pasting the repo is the right way to do so. |
This issue is still happening, and just popped up for me while I tried to add this component |
@robrbecker Did you find a workaround for this issue (besides creating intermediate repositories)? |
@ened Nope. I just avoided the problem by not using git-lfs. |
Is it still not fixed? I am trying to use git lfs in my flutter project and getting the error as follow:
I confirmed the types of PNG files using https://stackoverflow.com/a/27670182/5163725. Not sure what the issue is, any help will be appreciated thanks. |
I have same issue. I add my LFS repo to dependency_overrides and pub get fails with "smudge error", can't download LFS files. I found that (with --verbose), pub get clones the repository twice: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Are there by any chance any further updates on this? Or is disabling LFS on the original plugin repository still the only "solution" for now? |
I have same issue. |
Problem
The caching that pub does for git refs breaks git-lfs files that are in the lib directory.
(https://git-lfs.github.com/ for reference)
I have a file in the lib directory that is in LFS in repo A.
Repo B has a pubspec dependency on repo A as a git ref.
running
pub get
causes pub to bare clone the repo into .pub-cache/git/cache/REPOand then clones from that filesystem location into .pub-cache/git/name-HASH
The 2nd clone can't pull down the file from the LFS server since that repo is now a filesystem based clone and does not know where to find the LFS server.
Solution
Instead of cloning from .pub-cache/git/cache as a filesystem, you could copy the bare repo directory to .pub-cache/git/REPO-hash/.git and modify the config file to set
bare = false
and then checkout the working directory. This would preserve the actual origin so the LFS file can be found.I invite comments on this approach or suggestions for alternatives but I'd like to see LFS files work in lib directories in some manner.
The text was updated successfully, but these errors were encountered: