From 76e808a481452b84f9b71daf0e9123e1fa9394cb Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 12 Jan 2017 17:50:02 +0100 Subject: fix git updating logic --- taler-build/update_gnunet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taler-build/update_gnunet.sh b/taler-build/update_gnunet.sh index 04ebb57..1f9bedf 100755 --- a/taler-build/update_gnunet.sh +++ b/taler-build/update_gnunet.sh @@ -5,10 +5,10 @@ set -eu cd $HOME/gnunet/ 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" ./bootstrap ./configure --prefix=$HOME/local --enable-logging=verbose --with-libgnurl=$HOME/local --with-microhttpd=$HOME/local -- cgit v1.2.3