Имеется Gitlab 13.1.2
Добавил в /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive.d/ файл хука https://github.com/patsevanton/git-server-pre-receive-hooks/blob/master/reject-not-allowlist-email.sh
Глобальный gitlab хук, который отклоняет коммиты с адресами электронной почты не из разрешенного списка
Но возникает сообщение написанное в заголовке сообщения Вывод сообщения, когда делаем git push
remote: ++ git rev-list '49c8d42b40373944923ef839c2dee3afe24d746a 24d9fa75a13f90ddeda8c5ef12243bf80caa7c12 refs/heads/master..' --not --all
remote: fatal: ambiguous argument '49c8d42b40373944923ef839c2dee3afe24d746a 24d9fa75a13f90ddeda8c5ef12243bf80caa7c12 refs/heads/master..': unknown revision or path not in the working tree.
remote: Use '--' to separate paths from revisions, like this:
Фрагмент кода:
ZERO_COMMIT="0000000000000000000000000000000000000000"
while read -r OLDREV NEWREV REFNAME; do
if [[ "$NEWREV" = "$ZERO_COMMIT" ]]
then
# Branch or tag got deleted
continue
elif [[ "$OLDREV" = "$ZERO_COMMIT" ]]
then
# New branch or tag
echo "then"
echo "$NEWREV"
SPAN=$(git rev-list "$NEWREV" --not --all)
else
echo "else"
echo "$OLDREV"
echo "$NEWREV"
SPAN=$(git rev-list "$OLDREV".."$NEWREV" --not --all)
fi
Я так понимаю нужно поправить git rev-list. Но как? Спасибо