#!/bin/sh
set -e
##
# variables
git=/usr/local/bin/git
gitdir=$1
mode=u=rwX,g=rX,o=
# functions
gitexec()
{
doas -n -u _srczap \
/bin/sh -c "umask ${mode}; ${git} ${1}"
}
# main
cd "${gitdir}"
gitexec "rev-parse HEAD"