]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: only allow fast-forward when pulling
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 8 Jul 2015 10:59:48 +0000 (13:59 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Jul 2015 14:08:40 +0000 (15:08 +0100)
Only allow fast-forward merges in the component repositories when doing
git-pull. This makes it possible to spot problems (i.e. rewriting of
history) in the component upstream . Also, this change prevents the
creation of local-only merge commits in the component repositories.
These merges cause "last_revision" field of the combo-layer config to
point to a git commit that is only present in the users local component
repository but nowhere in upstream.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/combo-layer

index 2d100bebdfa3ca7a31d7bde8343187e05feeb584..8637addc8e14d44fc42ba160d2dd742d578423a9 100755 (executable)
@@ -587,7 +587,7 @@ def action_pull(conf, args):
         branch = repo.get('branch', "master")
         runcmd("git checkout %s" % branch, ldir)
         logger.info("git pull for component repo %s in %s ..." % (name, ldir))
-        output=runcmd("git pull", ldir)
+        output=runcmd("git pull --ff-only", ldir)
         logger.info(output)
 
 def action_update(conf, args):