diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 2550bde838..7442f84414 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -326,7 +326,7 @@ class Git(FetchMethod): branchname = ud.branches[ud.names[0]] runfetchcmd("%s checkout -B %s %s" % (ud.basecmd, branchname, \ ud.revisions[ud.names[0]]), d, workdir=destdir) - runfetchcmd("%s branch --set-upstream %s origin/%s" % (ud.basecmd, branchname, \ + runfetchcmd("%s branch %s --set-upstream-to origin/%s" % (ud.basecmd, branchname, \ branchname), d, workdir=destdir) else: runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=destdir)