diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index d859d763d4..e6758cfa42 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -270,11 +270,15 @@ do_validate_branches() { | |||
270 | # SRCREV (if it isn't the current HEAD of that branch) | 270 | # SRCREV (if it isn't the current HEAD of that branch) |
271 | git checkout -q master | 271 | git checkout -q master |
272 | for b in $containing_branches; do | 272 | for b in $containing_branches; do |
273 | branch_head=`git show-ref -s --heads ${b}` | 273 | branch_head=`git show-ref -s --heads ${b}` |
274 | if [ "$branch_head" != "$target_branch_head" ]; then | 274 | if [ "$branch_head" != "$target_branch_head" ]; then |
275 | echo "[INFO] Setting branch $b to ${target_branch_head}" | 275 | echo "[INFO] Setting branch $b to ${target_branch_head}" |
276 | git branch -D $b > /dev/null | 276 | if [ "$b" == "master" ]; then |
277 | git branch $b $target_branch_head > /dev/null | 277 | git reset --hard $target_branch_head > /dev/null |
278 | else | ||
279 | git branch -D $b > /dev/null | ||
280 | git branch $b $target_branch_head > /dev/null | ||
281 | fi | ||
278 | fi | 282 | fi |
279 | done | 283 | done |
280 | 284 | ||