[
https://ovirt-jira.atlassian.net/browse/OVIRT-3102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nir Soffer updated OVIRT-3102:
--
Attachment: commit-msg
On Fri, Jun 25, 2021 at 10:38 PM Nir Soffer wrote:
>
> In ovirt-imageio developer docs, we ask to install the commit-msg hook
> from gerrit:
>
> wget -P .git/hooks https://gerrit.ovirt.org/tools/hooks/commit-msg
>
> This downloads now a broken script that does not add a ChangeId header.
I found the issue, our instructions were missing:
chmod +x .git/hooks/commit-msg
After adding it, the new script works fine.
> In the past I think it returned something like the attached file,
> without the code for
> adding signed-off-by.
>
> I suggest to replace the current file at:
> https://gerrit.ovirt.org/tools/hooks/commit-msg
>
> Or if we want to keep the default file for some reason, add:
> https://gerrit.ovirt.org/tools/ovirt/hooks/commit-msg
>
> This file contains the code for adding the signed-off-by header, so so
> developers
> do not need to add this manually:
>
> # Add Signed-off-by trailer.
> sob=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by:
> \1/p')
> git interpret-trailers --in-place --trailer "$sob" "$1"
But developers still need to add the code above.
Attaching a version with this code to replace the current file.
> Broken commit-msg hook in gerrit
>
>
> Key: OVIRT-3102
> URL: https://ovirt-jira.atlassian.net/browse/OVIRT-3102
> Project: oVirt - virtualization made easy
> Issue Type: By-EMAIL
>Reporter: Nir Soffer
>Assignee: infra
> Attachments: commit-msg, commit-msg
>
>
> In ovirt-imageio developer docs, we ask to install the commit-msg hook
> from gerrit:
> wget -P .git/hooks https://gerrit.ovirt.org/tools/hooks/commit-msg
> This downloads now a broken script that does not add a ChangeId header.
> In the past I think it returned something like the attached file,
> without the code for
> adding signed-off-by.
> I suggest to replace the current file at:
> https://gerrit.ovirt.org/tools/hooks/commit-msg
> Or if we want to keep the default file for some reason, add:
> https://gerrit.ovirt.org/tools/ovirt/hooks/commit-msg
> This file contains the code for adding the signed-off-by header, so so
> developers
> do not need to add this manually:
> # Add Signed-off-by trailer.
> sob=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by:
> \1/p')
> git interpret-trailers --in-place --trailer "$sob" "$1"
> Later we need to replace this ugly shell script with proper code.
> Nir
--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100166)
___
Infra mailing list -- infra@ovirt.org
To unsubscribe send an email to infra-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:
https://lists.ovirt.org/archives/list/infra@ovirt.org/message/EMFMZUPBK34J7RMZWPBR4AYAUBWGNMWY/