mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
make shallow clone the default for ansibel-pull
This commit is contained in:
parent
c20c1a6d49
commit
1b2ebe8def
1 changed files with 4 additions and 4 deletions
|
@ -80,8 +80,8 @@ class PullCLI(CLI):
|
|||
help='directory to checkout repository to')
|
||||
self.parser.add_option('-U', '--url', dest='url', default=None,
|
||||
help='URL of the playbook repository')
|
||||
self.parser.add_option('--depth', dest='depth', default=None,
|
||||
help='Depth of checkout, shallow checkout if greater or equal 1 . Defaults to full checkout.')
|
||||
self.parser.add_option('--full', dest='fullclone', action='store_true',
|
||||
help='Do a full clone, instead of a shallow one.')
|
||||
self.parser.add_option('-C', '--checkout', dest='checkout',
|
||||
help='branch/tag/commit to checkout. ' 'Defaults to behavior of repository module.')
|
||||
self.parser.add_option('--accept-host-key', default=False, dest='accept_host_key', action='store_true',
|
||||
|
@ -157,8 +157,8 @@ class PullCLI(CLI):
|
|||
if self.options.verify:
|
||||
repo_opts += ' verify_commit=yes'
|
||||
|
||||
if self.options.depth:
|
||||
repo_opts += ' depth=%s' % self.options.depth
|
||||
if not self.options.fullclone:
|
||||
repo_opts += ' depth=1'
|
||||
|
||||
|
||||
path = module_loader.find_plugin(self.options.module_name)
|
||||
|
|
Loading…
Reference in a new issue