Fix output redirect
Configurable git checkout directory.
Update changes log
Fix git `--single-branch` detection
Fix SC2086. Double quote to prevent globbing and word splitting
Only shallow clone on version tags.

Fix missed references of `SALT_GIT_CHECKOUT_DIR` to `__SALT_GIT_CHECKOUT_DIR`
Fixes saltstack/salt#14855