mirror of https://gerrit.osmocom.org/osmo-ci
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:
parent
64c82cdeaf
commit
135f448545
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
project="$1"
|
||||
branch="${2:-origin/master}"
|
||||
branch="origin/${2:-master}"
|
||||
|
||||
if ! test -d "$project";
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue