- use git -C in subtrees script instead of pushd for better cross-OS compatibility

This commit is contained in:
Rachael Alexanderson 2025-08-13 17:17:09 -04:00
commit 0cb79b86ad
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -1,12 +1,12 @@
#!/bin/bash
pushd "$(git rev-parse --show-toplevel)" >/dev/null
export GITROOT="$(git rev-parse --show-toplevel)"
pull() {
if [[ "${1}" == "${2}" || "${1}" == "all" ]]
then
echo "fetching ${2}"
git subtree pull --prefix="${3}" "${4}" "${5}" --squash || exit
git -C $GITROOT subtree pull --prefix="${3}" "${4}" "${5}" --squash || exit
else
echo "${2} not specified, skipping"
fi