Skip to content

Conversation

@bk2204
Copy link
Member

@bk2204 bk2204 commented Feb 15, 2022

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

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.
@bk2204 bk2204 requested a review from a team as a code owner February 15, 2022 17:52
Copy link
Member

@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! ❤️

@bk2204 bk2204 merged commit fa62a9f into git-lfs:main Feb 15, 2022
@bk2204 bk2204 deleted the update-old-hook-content branch February 15, 2022 19:02
bk2204 added a commit that referenced this pull request Feb 15, 2022
lfs: add old hook content to the list of old hooks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitbucket and git lfs v3.1.1 Issue

2 participants