Hi After our upgrade from 8.17.4 to 9.4.1 our custom hooks can no longer access other repos. We keep the actual hook code in another repo and run it from repo where the code change is being checked in.
Were there changes made to prevent this between these two versions?
Based on information in this link - https://gitlab.com/gitlab-org/gitlab-ce/issues/32056, my colleague (Thanks Adam) wrote this short working test
#!/bin/bash
#
GIT=/opt/gitlab/embedded/bin/git
echo "Working Directory: $(pwd)"
echo "Starting GIT_OBJECT_DIRECTORY: ${GIT_OBJECT_DIRECTORY}"
GOD=$GIT_OBJECT_DIRECTORY
unset GIT_OBJECT_DIRECTORY
echo "Unset GIT_OBJECT_DIRECTORY: ${GIT_OBJECT_DIRECTORY}"
$GIT -C ../someother.git log -1
GIT_OBJECT_DIRECTORY=$GOD
echo "Reset GIT_OBJECT_DIRECTORY: ${GIT_OBJECT_DIRECTORY}"