diff --git a/TarSCM/cli.py b/TarSCM/cli.py index 17ecf4eb..322a559c 100644 --- a/TarSCM/cli.py +++ b/TarSCM/cli.py @@ -127,12 +127,13 @@ def parse_args(self, options): parser.add_argument('--subdir', default='', help='Package just a subdirectory of the sources') parser.add_argument('--submodules', - choices=['enable', 'master', 'disable'], + choices=['enable', 'master', 'main', 'disable'], default='enable', help='Whether or not to include git submodules ' 'from SCM commit log since a given parent ' 'revision (see changesrevision). Use ' - '\'master\' to fetch the latest master.') + '\'master\' or \'main\' to fetch the latest' + 'development revision.') parser.add_argument('--lfs', choices=['enable', 'disable'], default='disable', diff --git a/TarSCM/scm/git.py b/TarSCM/scm/git.py index 40ae1e00..8625f89d 100644 --- a/TarSCM/scm/git.py +++ b/TarSCM/scm/git.py @@ -201,7 +201,8 @@ def fetch_submodules(self): '--recursive'], cwd=self.clone_dir ) - elif 'submodules' in argsd and argsd['submodules'] == 'master': + elif 'submodules' in argsd and \ + argsd['submodules'] in ['main', 'master']: self.helpers.safe_run( self._get_scm_cmd() + ['submodule', 'update', '--init', '--recursive', '--remote'], diff --git a/appimage.service b/appimage.service index 9e241198..58c8a558 100644 --- a/appimage.service +++ b/appimage.service @@ -2,9 +2,10 @@ handle sources specified in appimage.yml This service needs to be executed to download sources according to appimage.yml file - Specify whether to include git submodules. Default is 'enable'. + Specify whether to include git submodules. Default is 'enable'. main or master is override the specified commit with master or main branch. enable master + main disable diff --git a/snapcraft.service b/snapcraft.service index d0098a14..c111f21a 100644 --- a/snapcraft.service +++ b/snapcraft.service @@ -2,9 +2,10 @@ handle sources specified in snapcraft.yaml This service needs to be executed to download sources according to snapcraft.yaml file. It also patches the snapcraft tile to use local sources during build. - Specify whether to include git submodules. Default is 'enable'. + Specify whether to include git submodules. Default is 'enable'. main or master is override the specified commit with master or main branch. enable master + main disable diff --git a/tar_scm.service.in b/tar_scm.service.in index 57e171d5..0e68da6d 100644 --- a/tar_scm.service.in +++ b/tar_scm.service.in @@ -172,9 +172,10 @@ which get maintained in the SCM. Can be used multiple times. Obsolete parameter which will be ignored. - Specify whether to include git submodules. Default is 'enable'. + Specify whether to include git submodules. Default is 'enable'. main or master is override the specified commit with master or main branch. enable master + main disable ===OBS_ONLY