-
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
Enforce minimum git version check (currently >= 1.8.2) when running a… #1212
Enforce minimum git version check (currently >= 1.8.2) when running a… #1212
Conversation
…ny command. Fixed git-lfs#1210 .
Thanks for the PR! @sinbad: Any thoughts on checking the git version on every command, or just specific ones? It seems fast, but may become an issue when running the Unfortunately, this is adding a couple extra |
I'm amazed anyone is still running git that old :) I'd prefer to keep the checks to a minimum - although As an even tighter optimisation I could suggest adding the check only to |
👍
I picked the other commands to guard against cases where people just dump the binary into their PATH and try to push ahead without checking things. I don't think you can get very far without running those. They're also not ever called multiple times in a tight loop like |
Yeah, that's fair - I'm happy so long as we avoid smudge & clean then. |
I'd probably add |
RedHat 6 machines are pretty wide spread and in use. The version of git in the RH6/CentOS6 repos is 1.7.x. I typically compile git in those cases. |
@samrocketman This PR is about communicating to end users what the minimum git version is, not setting a new minimum git version. It's a good idea to let them know ahead of time, and not later when they're wondering why LFS isn't working correctly. Closing this in favor of #1461, which only runs in the commands specified above, and adds git version caching. Here's sample output, proving that $ GIT_TRACE=1 script/run track
16:20:45.908860 git.c:350 trace: built-in: git 'rev-parse' '--short' 'HEAD'
trace git-lfs: run_command: 'git' version
trace git-lfs: run_command: 'git' config -l
Listing tracked paths |
…ny command. Fixed #1210 .