diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/combo-layer | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer index 8637addc8e..6b0c56d37e 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer | |||
@@ -586,9 +586,14 @@ def action_pull(conf, args): | |||
586 | ldir = repo['local_repo_dir'] | 586 | ldir = repo['local_repo_dir'] |
587 | branch = repo.get('branch', "master") | 587 | branch = repo.get('branch', "master") |
588 | runcmd("git checkout %s" % branch, ldir) | 588 | runcmd("git checkout %s" % branch, ldir) |
589 | logger.info("git pull for component repo %s in %s ..." % (name, ldir)) | 589 | logger.info("update component repo %s in %s ..." % (name, ldir)) |
590 | output=runcmd("git pull --ff-only", ldir) | 590 | if not args.hard_reset: |
591 | logger.info(output) | 591 | output=runcmd("git pull --ff-only", ldir) |
592 | logger.info(output) | ||
593 | else: | ||
594 | output=runcmd("git fetch", ldir) | ||
595 | logger.info(output) | ||
596 | runcmd("git reset --hard FETCH_HEAD", ldir) | ||
592 | 597 | ||
593 | def action_update(conf, args): | 598 | def action_update(conf, args): |
594 | """ | 599 | """ |
@@ -895,6 +900,10 @@ Action: | |||
895 | parser.add_option("-n", "--no-pull", help = "skip pulling component repos during update", | 900 | parser.add_option("-n", "--no-pull", help = "skip pulling component repos during update", |
896 | action = "store_true", dest = "nopull", default = False) | 901 | action = "store_true", dest = "nopull", default = False) |
897 | 902 | ||
903 | parser.add_option("--hard-reset", | ||
904 | help = "instead of pull do fetch and hard-reset in component repos", | ||
905 | action = "store_true", default = False) | ||
906 | |||
898 | parser.add_option("-H", "--history", help = "import full history of components during init", | 907 | parser.add_option("-H", "--history", help = "import full history of components during init", |
899 | action = "store_true", default = False) | 908 | action = "store_true", default = False) |
900 | 909 | ||