lfs: add old hook content to the list of old hooks #4878
Merged
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