summaryrefslogtreecommitdiff
path: root/taler-build/update_merchant.sh
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-01-12 17:53:32 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-01-12 17:53:32 +0100
commite7ecd9aac8260874c3c7af0a5335b22282eba207 (patch)
tree86408ade2cc09705e8b683c705adc411774620a0 /taler-build/update_merchant.sh
parent76e808a481452b84f9b71daf0e9123e1fa9394cb (diff)
downloaddeployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.tar.gz
deployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.tar.bz2
deployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.zip
fix git updating logic
Diffstat (limited to 'taler-build/update_merchant.sh')
-rwxr-xr-xtaler-build/update_merchant.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/taler-build/update_merchant.sh b/taler-build/update_merchant.sh
index 7c00bdf..6cab4be 100755
--- a/taler-build/update_merchant.sh
+++ b/taler-build/update_merchant.sh
@@ -7,10 +7,10 @@ set -eu
cd $HOME/merchant/
git clean -fdx
-# like "git pull", but robust against force pushes
-# and local changes
git fetch
-git reset --hard FETCH_HEAD
+# reset to updated upstream branch, but only if we're tracking a branch
+branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
+git reset --hard "$branch"
git submodule update --init --force