added set -eu; fixed logic of gitize