summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/git.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 109cc788e..c1ad68aa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@ Changes in Bitbake 1.9.x:
- Fix shell data updating problems (#1880)
- Properly raise errors for invalid source URI protocols
- Change the wget fetcher failure handling to avoid lockfile problems
+ - Add support for branches in git fetcher (Otavio Salvador, Michael Lauer)
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index 21259a23b..9cc7f4e08 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -50,6 +50,8 @@ class Git(Fetch):
if 'protocol' in ud.parm:
ud.proto = ud.parm['protocol']
+ ud.branch = ud.parm.get("branch", "")
+
tag = Fetch.srcrev_internal_helper(ud, d)
if tag is True:
ud.tag = self.latest_revision(url, ud, d)
@@ -130,7 +132,8 @@ class Git(Fetch):
def _latest_revision(self, url, ud, d):
- output = runfetchcmd("git ls-remote %s://%s%s" % (ud.proto, ud.host, ud.path), d, True)
+ bb.msg.note(1, bb.msg.domain.Fetcher, "Calling git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch ) )
+ output = runfetchcmd("git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d, True)
return output.split()[0]
def _build_revision(self, url, ud, d):