Skip to content
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

Automatically install commit-msg hook #16

Open
twmr opened this issue Feb 25, 2021 · 0 comments
Open

Automatically install commit-msg hook #16

twmr opened this issue Feb 25, 2021 · 0 comments

Comments

@twmr
Copy link
Owner

twmr commented Feb 25, 2021

It happened to me already several times that I wanted to upload a commit (or commits) to gerrit in a repo that doesn't have the gerrit commit-msg hook, which is responsible for adding the ChangeId line to the commit-msg.

In a recent commit I've added support for checking if the commit contains a change-id line before the gerrit-upload transient is shown. This avoids that you have to re-enter the gerrit-upload transient settings (assignee, topic, ..) after realizing that gerrit didn't accept the new commit due to a missing change-id line.

It would be nice if we could instead add a hook to git-commit-mode that checks if the upstream is a repo on a gerrit server downloads the commit-msg hook if it does not yet exist for the current repo.

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

No branches or pull requests

1 participant