You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: git lfs fetch/pull/checkout to call git equivalents? #1059
Discussed as a follow-on from git lfs clone#844 (comment)
Proposal:
Make git lfs pull, git lfs fetch, git lfs checkout perform the equivalent git commands first by default & pass args. git checkout probably doesn't need to do anything in most cases but if the file has been deleted this will make sure it gets restored AND converted to real lfs content which is better
Add --only-lfs option to all 3 commands to bypass git part (backward compatibility & internal use)
Require paths in git lfs checkout to be after -- as with git checkout
Suppress filters during git lfs checkout and git lfs pull to gain same optimisations as git lfs clone
The advantages of doing this are:
Consistency; commands that sound like git commands always perform the git equivalent as well first & support the same options
Performance; git lfs clone improved clone performance by at least 50x, but large pulls or branch switches still have the serial smudge performance issue, which this will avoid
Disadvantages:
Behaviour changes to the commands affected, although not unintuitive ones
Breaking change to git lfs checkout interface (will now need -- before paths)
Sounds sensible to me. I would probably add a git-lfs config value to make --only-lfs the default behavior again (for backwards compatibility).
That being said, I wonder if we should rather tackle the root of the problem as mentioned by @peff : #931 (comment)
That is making Git filters process files as batches. I volunteered as Google Summer of Code mentor and I wonder if this might be an interesting project for a student?!
I'm not keen on a sticky config value because they tend to get forgotten and cause hidden issues & support cases; I'd rather it be explicit on each command. We're breaking it anyway, so the action for those wanting the old behaviour might as well be to change the args rather than setting a config value for scripts, and for interactive use the new default is likely to be useful anyway.
As for git calling filters in batch, that would be great but I don't think we should necessarily rely on that getting accepted, plus supporting older git versions is nice.
I originally closed this because I hadn't looked at the time frame of this issue carefully enough, and thought that this was a proposal to add commands such as git lfs {push,pull,etc}, which have existed for a long time.
It appears, however, that this issue seeks to change their behavior to call the underling Git operations as well. I think that this is a sizeable project, and think that we should avoid committing work to it since the current behavior works well for most users.
Activity
larsxschneider commentedon Mar 3, 2016
Sounds sensible to me. I would probably add a git-lfs config value to make
--only-lfsthe default behavior again (for backwards compatibility).That being said, I wonder if we should rather tackle the root of the problem as mentioned by @peff : #931 (comment)
That is making Git filters process files as batches. I volunteered as Google Summer of Code mentor and I wonder if this might be an interesting project for a student?!
sinbad commentedon Mar 3, 2016
I'm not keen on a sticky config value because they tend to get forgotten and cause hidden issues & support cases; I'd rather it be explicit on each command. We're breaking it anyway, so the action for those wanting the old behaviour might as well be to change the args rather than setting a config value for scripts, and for interactive use the new default is likely to be useful anyway.
As for git calling filters in batch, that would be great but I don't think we should necessarily rely on that getting accepted, plus supporting older git versions is nice.
technoweenie commentedon Mar 3, 2016
I'm not sure we'll need a sticky config. I'm not opposed to adding one. I just added this to the v1.2 TODO list (#844):
ttaylorr commentedon Apr 16, 2018
I originally closed this because I hadn't looked at the time frame of this issue carefully enough, and thought that this was a proposal to add commands such as
git lfs {push,pull,etc}, which have existed for a long time.It appears, however, that this issue seeks to change their behavior to call the underling Git operations as well. I think that this is a sizeable project, and think that we should avoid committing work to it since the current behavior works well for most users.