-p, --prune Before fetching, remove any remote-tracking references that no longer exist on the remote.
Fixed: $ git push origin :test_branch $ ./update.py The test_branch was still in fetched local repo which was incorrect, it should be gone since it has been removed by upstream. Signed-off-by: Robert Yang <liezhi.y...@windriver.com> --- layerindex/update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layerindex/update.py b/layerindex/update.py index f8e5a37..2d578df 100755 --- a/layerindex/update.py +++ b/layerindex/update.py @@ -264,7 +264,7 @@ def main(): if not os.path.exists(repodir): out = utils.runcmd("git clone %s %s" % (layer.vcs_url, urldir), fetchdir, logger=logger, printerr=False) else: - out = utils.runcmd("git fetch", repodir, logger=logger, printerr=False) + out = utils.runcmd("git fetch -p", repodir, logger=logger, printerr=False) except subprocess.CalledProcessError as e: logger.error("Fetch of layer %s failed: %s" % (layer.name, e.output)) failedrepos[layer.vcs_url] = e.output @@ -279,7 +279,7 @@ def main(): if not os.path.exists(bitbakepath): out = utils.runcmd("git clone %s %s" % (settings.BITBAKE_REPO_URL, 'bitbake'), fetchdir, logger=logger) else: - out = utils.runcmd("git fetch", bitbakepath, logger=logger) + out = utils.runcmd("git fetch -p", bitbakepath, logger=logger) if options.actual_branch: update_actual_branch(layerquery, fetchdir, branches[0], options, update_bitbake, bitbakepath) -- 2.10.2 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto