bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badly
Fix a bug where ud.branches were being referenced before it was set by
the git fetcher when using AUTOREV. To do this some ordering needed
to be changed. This fixes errors like:
ERROR: Error parsing /recipes-kernel/linux/rt-tests_git.bb: Failure expanding variable
SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception
AttributeError: 'FetchData' object has no attribute 'branches'
(From Poky rev:
2d2d07275c8a2d652a221c1cd74d28c2f6f226d5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>