osmo-deps.sh: fix: add 'origin/' to branch, to properly update

If I have a git clone that once did 'checkout [-f] branch', and if then
origin/branch gets updates, doing another 'checkout -f branch' only goes back
to the local tracking-branch of origin/branch. We never pull in changes from
origin/branch anymore as soon as a local branch exists. Always prepend
'origin/', so that 'checkout -f' goes into detached-HEAD state onto the newest
fetched revision.

Change-Id: Ia715a100b5beaf7e612c2c64cdad8819aa00c8bd
This commit is contained in:
Neels Hofmeyr 2017-11-01 13:45:10 +01:00
parent 64c82cdeaf
commit 135f448545
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
set -ex
project="$1"
branch="${2:-origin/master}"
branch="origin/${2:-master}"
if ! test -d "$project";
then