From 693934031ab26d22793e5bddbcc998473ca5bf42 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 23 Sep 2015 15:34:54 -0700 Subject: bitbake: toaster: use git reset --hard instead of rebase Replaced 'git checkout && git rebase' with 'git reset --hard' as with git checkout repository ends up with detached HEAD. Rebase makes things even worse as it can cause conflicts. git reset --hard resets repository to the required state in a most straightforward and reliable way. [YOCTO #7505] (Bitbake rev: f3641a8422e67890410594453b8baf362c27df2b) Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index e2d9375d31..e9f8c2a7ec 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -268,7 +268,7 @@ class LocalhostBEController(BuildEnvironmentController): # branch magic name "HEAD" will inhibit checkout if commit != "HEAD": logger.debug("localhostbecontroller: checking out commit %s to %s " % (commit, localdirname)) - self._shellcmd("git fetch --all && git checkout \"%s\" && git rebase \"origin/%s\"" % (commit, commit) , localdirname) + self._shellcmd('git fetch --all && git reset --hard "origin/%s"' % commit, localdirname) # take the localdirname as poky dir if we can find the oe-init-build-env if self.pokydirname is None and os.path.exists(os.path.join(localdirname, "oe-init-build-env")): -- cgit v1.2.3-54-g00ecf