-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add skip to native git-lfs install #346
base: main
Are you sure you want to change the base?
Conversation
- Read the PrePushHook info from the JGit library. - Looking for any form of `git lfs post-merge`
- PreflightUtils: add a hook checker b4 the git-install - This allows the git-install to ignore replacing custom hooks if the custom hook satisfy the git lfs hooks - CommitUtils add info to syslog-info (for easier logs)
- nativeGitLfsUpdater - nativeGitLfsHookCheck
We can hold off on squash-merging this pull request waiting for two things:
I am not sure of the direction to go in. |
Thanks for this. I'd probably be more inclined to have a simple configuration switch that disables the installation behavior entirely. Just easier to maintain and less likely to complicate matters for advanced users. I'll have to take a closer look in a few days, though. |
So we have this switch on by default? I am down to do so! |
Mmm. I think it should be off by default, TBH. It's very much an 'advanced users' kind of thing. The vast majority of users don't even know what a git hook is. But since it will be a git config option (like everything else in the mod), you can easily make it the default for yourself by setting it in your global git config. |
but the git hook is part of gitlfs install. that's why this needs to be on
by default.
|
Yes, I'm aware. I think maybe I misunderstood what you're trying to achieve. I thought you wanted the option of disabling the automatic 'lfs install' so that you could manage your own git hooks manually. |
Oh... switch that disables gitlfs while in the true position haha. yeah my mistake. I meant to have a positive switch for gitlfs set to default on. but i think we are on the same page, just need to figure out what users will want to see " Disable auto GitLfS" switch or a switch for "auto gitlfs" |
- I am coding mobile and can't test code - Add en_us L10N for "auto-gitlfs-install" - Tweak Preflight to launch gitlfs install on config true - Add config enum AUTO_GITLFS_INSTALL
f3a90f6
to
65e59ba
Compare
- Register Auto GitLFS Install
@pcal43 is the i18n system for the following keys implemented at all? "fastback.help.command.set-autoback-action" : "Set an action to perform during auto-backups.",
"fastback.help.command.set-autoback-wait" : "Set the minimum number of minutes to wait between auto-backups.",
"fastback.help.command.set-remote" : "Set the url for remote backups.",
"fastback.help.command.set-remote-retention" : "Set snapshot retention policy for the remote backup.",
"fastback.help.command.set-retention" : "Set snapshot retention policy.",
"fastback.help.command.set-shutdown-action" : "Set an action to perform on shutdown.", |
They should be used for |
...regarding the larger change, I appreciate the effort but I think it's a lot heavier than I would want it to be for a little-used flag. I don't think it needs a command; it would be just a simple config switch. I'll add it myself next time I'm working on the mod. |
Summary
auto-gitlfs-install
Details
Forcing default git-lfs hooks during preflight causes issues with custom hooks.
By checking for default git-lfs hooks in the contents of the files, we can skip a bad git-lfs attempted override.
The following three states will happen:
In addition, allows advance users to ignore a forced git-lfs assurance via the
auto-gitlfs-install
config (set to false will disable it).Bug Fixes
Allows for the ignoring of bad git-lfs re-install even though the hooks are still git-lfs functional.