lfs: add old hook content to the list of old hooks#4878
Merged
bk2204 merged 1 commit intogit-lfs:mainfrom Feb 15, 2022
Merged
Conversation
Our hook code is designed to automatically replace old hooks that it knows about with new ones. However, in ed3decf ("use backticks around commands in messages", 2022-01-26), we made a change to the hook and accidentally forgot to include the old hook content. Let's fix this by providing our old hook content, which contains a template, and processing each of the corresponding old hooks to replace the template. This will cause unmodified hooks to be automatically updated, just like we expect.
chrisd8088
approved these changes
Feb 15, 2022
Member
chrisd8088
left a comment
There was a problem hiding this comment.
Thanks for fixing this! ❤️
bk2204
added a commit
that referenced
this pull request
Feb 15, 2022
lfs: add old hook content to the list of old hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our hook code is designed to automatically replace old hooks that it knows about with new ones. However, in ed3decf ("use backticks around commands in messages", 2022-01-26), we made a change to the hook and accidentally forgot to include the old hook content.
Let's fix this by providing our old hook content, which contains a template, and processing each of the corresponding old hooks to replace the template. This will cause unmodified hooks to be automatically updated, just like we expect.
Note that I opted not to provide any tests since we know the hook upgrade code already works and this is doing little more than just adding a single new entry.
Fixes #4876
/cc @chuckgregoryACES as reporter