-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Roadmap: local storage management #490
Comments
I'd also like to essentially rename the current I don't think breaking the command up is necessary right away though. I'd be happy with just renaming One other feature that I'd like for the new
|
👍 to this. In the current implementation of fetch the download and smudge steps are pretty separate in the code so splitting them up will be straight forward. |
Ah yes, I forgot to include this, updated. There's one for rename fetch->pull which can be done first to stabilise that interface, and then to add separate fetch & checkout, but I'll probably get them done around the same time anyway.
Good call, added. Your list of command variants was correct (no params = current checkout unless lfs.fetch-recent-always gitconfig setting is enabled), the only thing not on your list was the option to specify 1 or more explicit refs to fetch for (currently only 1 is supported), useful for people wanting to script it. |
First PR: #527 |
@sinbad: I think all of the prune items are done now too. Can you confirm? |
Yep, all the prune items are done, forgot to circle back, sorry. |
🤘 |
Is there any way to accomplish retrospective pruning of excluded paths currently? |
@abbiekressner not currently, and I don't have this on my immediate roadmap. That being said, I'd be happy to help a contributor looking to get started in working with LFS by offering guidance through opening a pull request. |
@ttaylorr I would love to help out with this, but I am rather busy at the moment. I may have more time to look into it in a month or so, but I'm a bit of a newbie with actually contributing to projects like this so I would indeed need some guidance on where to start. |
@abbiekressner that's great! Here a few places you could take a look to get started:
|
Great! Thanks, @ttaylorr! I will let you know if I manage to get anywhere with it. I have one more question for you: Does including an |
It does 😄 , but only if you invoke it through |
Thanks for all the quick responses, @ttaylorr! Keep up the great work! |
This is a meta issue for the roadmap. Comments should be geared towards the addition and deletion of tasks. Leave detailed discussion to issues linked in tasks. If a task doesn't have an issue next to it, create one and leave a comment here so we can update the list.
Tasks
Prune Command
Deletes objects which fall outside retention conditions in order to save disk space on the local clone. Can be invoked specifically (git lfs prune) or via the --prune option on fetch. The following must be retained:
git worktree
to avoid pruning HEAD objects from any referenced worktreeThe reason for so many configurable options here is that deleting something too aggressively may result in large downloads which will frustrate the user. The prune command has to be useful enough to be regularly used to keep local storage at a reasonable level, but without annoying the user with repeat downloads if they happen to switch branches or want to look at recent changes. Omitting more options and only keeping the current HEAD + unpushed would probably make a lot of people not use it after they realised they had to re-download other recent branches.
All options should be kept in gitconfig so the user can specify their general preferences for retention and override them for specific repositories if they want. Having them as config options rather than command line options also means they only have to think about them once, making using the command much easier.
Fetch command extensions
Update the fetch command so that it has the following features:
git lfs prune
afterwardsWhere 'recent' objects closely mirrors the prune command's retention periods.
git lfs fetch
to accept multiple refscheckout
commandcheckout
should interpret.
./
.\
args correctly to filter to current dirfetch
andpull
to be specific about where to fetch from--recent
option (always done after named refs or current checkout)--all
to download all objects referenced by any reachable commit--prune
option to trim storage post-fetchThe main purpose of this is to allow users to bulk fetch objects at a time of their choosing, even if they may not have those objects checked out right now. This is useful for running just before travelling, or downloading in the background while you work on other things so that the objects are already there when you come to check out another branch or review a recent change, meaning you don't have to wait.
Include / exclude paths
This feature will allow people to fetch only files in specific paths, or exclude files in specific paths. This is helpful in big repos where a user only needs a subset of the large files to perform their work and would rather not spend the download time or local disk space on any others.
This involves two settings in gitconfig called
lfs.include-paths
andlfs.exclude-paths
, both of which can contain comma-separated lists of relative repository paths, with wildcard matching as in gitignore. If either are specified, they affect the behaviour ofgit lfs fetch
, depending on the path of the file which is referencing the object (in the commit which is being fetched for).The text was updated successfully, but these errors were encountered: