GIT_DIR is not set in server update hook

Hi! I use server update hook. And in sample (update.sample) I have the following code:

...
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"

# --- Safety check
if [ -z "$GIT_DIR" ]; then
	echo "Don't run this script from the command line." >&2
	echo " (if you want, you could supply GIT_DIR then run" >&2
	echo "  $0 <ref> <oldrev> <newrev>)" >&2
	exit 1
fi
...

And server hook not works, because GIT_DIR variable not set. Can you set GIT_DIR for server hooks?