Re: Strange hook in cloned package repositories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 27, 2023 at 2:14 PM Vitaly Zaitsev via devel
<devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hello.
>
> All of the newly cloned Fedora package repositories have a strange Git
> pre-push hook.
>
> Code listing:
>
> ```
> #!/bin/bash
>
> _remote="$1"
> _url="$2"
>
> exit_code=0
> while read -r _local_ref local_sha _remote_ref _remote_sha
> do
>      command -v fedpkg >/dev/null 2>&1 || { echo >&2 "Warning: 'fedpkg'
> is missing, \
> pre-push check is omitted. See .git/hooks/pre-push"; exit 0; }
>      fedpkg pre-push-check "$local_sha"
>      ret_code=$?
>      if [ $ret_code -ne 0 ] && [ $exit_code -eq 0 ]; then
>          exit_code=$ret_code
>      fi
> done
>
> exit $exit_code
> ```
>
> What is the purpose of this hook? Is it possible to disable its
> generation for my packages?

It's doing new pre-push checks that were introduced in rpkg 1.66:
https://docs.pagure.org/rpkg/releases/1.66.html#checking-a-repo-configuration-before-git-push-with-a-git-hook-script

As far as I know, there's no way to disable the checks for now, other
than to do "rm .git/hooks/pre-push".

Fabio
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux