- use git -C in subtrees script instead of pushd for better cross-OS compatibility
This commit is contained in:
parent
f2745e4c82
commit
0cb79b86ad
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue