Our sample script to run GGShield as pre-receive via Docker does not work. This is because pre-receive commits are kept in a "quarantine" environment (see https://git-scm.com/docs/git-receive-pack#_quarantine_environment), git sets some environment variables before running the pre-receive hook so that git commands run by the hook can find the quarantined commits.
Furthermore, since these environment variables contain absolute path to directories, the path to the git checkout inside the Docker container must be the same as the path on the host.
What has been done
Propagate GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY and GIT_QUARANTINE_PATH,
Map PWD to PWD and use it as the current work directory.
Description
Our sample script to run GGShield as pre-receive via Docker does not work. This is because pre-receive commits are kept in a "quarantine" environment (see https://git-scm.com/docs/git-receive-pack#_quarantine_environment), git sets some environment variables before running the pre-receive hook so that git commands run by the hook can find the quarantined commits.
Furthermore, since these environment variables contain absolute path to directories, the path to the git checkout inside the Docker container must be the same as the path on the host.
What has been done