bitbake: fetch: Drop multiple branch/revision support for single git urls

We used to use this for bare clones where a single git url could handle multiple
revisions (which implied multiple branches).

We don't use this any more and I doubt we'd want to go back to it. If we
remove it, we can simplfy the looping in the code which seems desireable.

This patch does change the warning for missing branch parameters to a
error. The message has hinted about that for long enough.

Some test cases are removed since they are no longer needed.

(Bitbake rev: 2515fbd10824005fa7f34e87706000c079920366)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2025-03-18 22:17:17 +00:00
parent 67566c7410
commit bdd2b0fee1
5 changed files with 135 additions and 277 deletions

View File

@@ -190,15 +190,14 @@ class GoModGit(Git):
ud.path = ''
if 'protocol' not in ud.parm:
ud.parm['protocol'] = 'https'
name = f"{module}@{ud.parm['version']}"
ud.names = [name]
srcrev = d.getVar('SRCREV_' + name)
ud.name = f"{module}@{ud.parm['version']}"
srcrev = d.getVar('SRCREV_' + ud.name)
if srcrev:
if 'srcrev' not in ud.parm:
ud.parm['srcrev'] = srcrev
else:
if 'srcrev' in ud.parm:
d.setVar('SRCREV_' + name, ud.parm['srcrev'])
d.setVar('SRCREV_' + ud.name, ud.parm['srcrev'])
if 'branch' not in ud.parm:
ud.parm['nobranch'] = '1'