summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-23 15:34:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:06 +0100
commitf3641a8422e67890410594453b8baf362c27df2b (patch)
treef57722c939e7ec2b0d6fd0e59f707409a64ff486
parentedac7b7533d50455baaaf05a46b7ace49bb24b95 (diff)
downloadbitbake-f3641a8422e67890410594453b8baf362c27df2b.zip
toaster: use git reset --hard instead of rebase
Replaced 'git checkout <ref> && 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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/bldcontrol/localhostbecontroller.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py
index e2d9375d..e9f8c2a7 100644
--- a/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/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")):