kas: Support --update argument

By default we do not update a repository if the desired refspec is
already checked out and so we do not pull any new commits that may have
been added to this refspec upstream. If the new `--update` argument is
passed on the command line then we instead pull in any new upstream
commits.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Paul Barker
2020-06-15 22:03:31 +02:00
committed by Jan Kiszka
parent 1569895001
commit 24f2f66cf5
3 changed files with 19 additions and 10 deletions

View File

@@ -109,6 +109,10 @@ def setup_parser_common_args(parser):
parser.add_argument('--force-checkout', action='store_true',
help='Always checkout the desired refspec of each '
'repository, discarding any local changes')
parser.add_argument('--update', action='store_true',
help='Pull new upstream changes to the desired '
'refspec even if it is already checked out locally')
def kas_get_argparser():
"""