mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 06:10:11 +01:00
build-from-source: fix checking-out branches by name
Without it, `git checkout -B nmbuild nm-1-10` will fail, because
there is no local branch refs/heads/nm-1-10. Previously, it worked
because there was (one) refs/remotes/origin/nm-1-10, so if we didn't
specify "-B" option, git would create a remote-tracking local branch.
Fix it, by fetching the remote branches as local branches.
Fixes: 2f67ac9eaf
This commit is contained in:
parent
2f67ac9eaf
commit
b7ba495aa9
1 changed files with 2 additions and 1 deletions
|
|
@ -84,9 +84,10 @@ cd "./NetworkManager/"
|
|||
|
||||
# if we fetch from a github repository, we also care about the refs to the pull-requests
|
||||
# fetch them too.
|
||||
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 fetch origin
|
||||
git fetch origin --prune
|
||||
|
||||
git checkout -B nmbuild "$BUILD_ID"
|
||||
echo "HEAD is $(git rev-parse HEAD)"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue