sb: Add git clean to the supported git commands.

This commit is contained in:
Chris Johns
2020-05-08 14:28:04 +10:00
parent da17bda77a
commit 1f972c2108
2 changed files with 17 additions and 0 deletions

View File

@@ -515,6 +515,15 @@ def _git_downloader(url, local, config, opts):
log.notice('git: reset: %s' % (us[0]))
if _do_download(opts):
repo.reset(arg)
repo.submodule_foreach(['reset'] + arg)
elif _as[0] == 'clean':
arg = []
if len(_as) > 1:
arg = ['--%s' % (_as[1])]
log.notice('git: clean: %s' % (us[0]))
if _do_download(opts):
repo.clean(arg)
repo.submodule_foreach(['clean'] + arg)
elif _as[0] == 'protocol':
pass
else: