-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Default system gitconfig skips LFS download #2321
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
Ok, here's the rundown:
So in summary 2.21.0 accidentaly shipped no Git LFS config while 2.22.0 and 2.23.0 shipped with a broken Git LFS config due to my inability to read source code. |
Thank you for the update! That's good to know. Does that mean the next version will potentially go back to pre-2.23.0 behavior of automatically downloading LFS binaries during clone? Reading source code is hard, I had to have one of my coworkers look at your source code for me! |
Yes, I think so. I'll prepare a PR to get this fixed. |
This reverts commit 047ff72. The config settings for git-lfs hadn't actually changed. 047ff72 accidentaly introduced the config settings that "git lfs install --skip-smudge" would apply. This fixes git-for-windows/git#2321.
The next snapshot will have the fix. |
Thank you all for your work on this and git-for-windows. |
Reference #2140
Setup
I've seen the same behavior on Windows 7 (64-bit) and Windows 10 (64-bit).
defaults?
to the issue you're seeing?
I first encountered this with git installed on my computers (tried multiple, Windows 7, Windows 10, etc.). I then found that the portable version of git exhibited the same thing, so that is probably an easier environment to reference, because it eliminates the variability of the installed configuration.
Details
Bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
In the past, I did "git clone " on a repository (hosted on Bitbucket in this case) which had LFS enabled, and git would download all the LFS binaries during the clone. As of version 2.23, it no longer downloads the LFS binaries when I clone the repository. Comparing portable git v2.23 with previous versions, I tracked the change in behavior to these settings in the --system config:
(mingw64/etc/gitconfig)
I confirmed that these are the settings active in my environment with:
I found that in prior versions the
--skip
flag was not present in this file. Eventually I stumbled across #2140 and 047ff72c3bbd74336321a279d585b72fb5c069ad, which appears to be when the--skip
flag was added to the default settings. I found that by removing the--skip
flag, or overriding these settings in my global gitconfig, git went back to the behavior I took for granted (automatically downloading the LFS binaries).I see these same settings when I install git or use portable git, on multiple computers, so I don't think my system is broken. These settings appear to be what you get when you give LFS the
--skip-smudge
flag, and the documentation appears to confirm the behavior I see:Can someone help me understand why these are the default settings? Is there an expectation that users should be doing more setup and configuration when dealing with LFS? (Like running
git lfs fetch
,git lfs pull
or setting your own gitconfig settings to not include the--skip
flag.) Like I said, I previously took for granted that everything just "worked" without any configuration or setup. Or is there something wrong with my repositories? (We have several that are similar, and this happens on all of them.)I'm not an expert on LFS, so I'm struggling to understand how the settings affect things and why the defaults changed. I don't understand why they changed, but also don't know enough to claim they shouldn't have changed. Once I figured out what was going on, it wasn't difficult to change the behavior on my system. However, I've got a whole team of people using git on a repository with LFS, and I'm trying to figure out the best approach.
(See above)
URL to that repository to help us with testing?
Not at this time.
The text was updated successfully, but these errors were encountered: