mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 02:30:18 +01:00
build-from-source: fix checking-out branches by name (2)
git doesn't like to fetch into a local branch which is currently
checked out.
$ git fetch origin --prune
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
We need to first checkout a plain commit (detached HEAD).
Fixes: 2f67ac9eaf
This commit is contained in:
parent
b7ba495aa9
commit
d8f99fe901
1 changed files with 2 additions and 1 deletions
|
|
@ -87,9 +87,10 @@ cd "./NetworkManager/"
|
|||
git config --add remote.origin.fetch '+refs/heads/*:refs/heads/*'
|
||||
git config --add remote.origin.fetch '+refs/tags/*:refs/nmbuild-origin/tags/*'
|
||||
git config --add remote.origin.fetch '+refs/pull/*:refs/nmbuild-origin/pull/*'
|
||||
git checkout HEAD^{}
|
||||
git fetch origin --prune
|
||||
|
||||
git checkout -B nmbuild "$BUILD_ID"
|
||||
|
||||
echo "HEAD is $(git rev-parse HEAD)"
|
||||
|
||||
if [[ "$DO_TEST_BUILD" == yes ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue