Skip to content

Commit dffef9d

Browse files
committed
fix for issue #718
1 parent 1792442 commit dffef9d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gitlab/v4/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ def _populate_sub_parser_by_class(cls, sub_parser):
230230
for x in required if x != cls._id_attr]
231231
[sub_parser_action.add_argument("--%s" % x.replace('_', '-'),
232232
required=False)
233-
for x in optional if x != cls._id_attr]
233+
for x in optional if x != cls._id_attr
234+
and x not in ['recursive']]
235+
[sub_parser_action.add_argument("--%s" % x, action='store_true',
236+
required=False)
237+
for x in optional if x in ['recursive']]
234238

235239
if mgr_cls.__name__ in cli.custom_actions:
236240
name = mgr_cls.__name__

gitlab/v4/objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
32823282
('wikis', 'ProjectWikiManager'),
32833283
)
32843284

3285-
@cli.register_custom_action('Project', tuple(), ('path', 'ref'))
3285+
@cli.register_custom_action('Project', tuple(), ('path', 'ref', 'recursive'))
32863286
@exc.on_http_error(exc.GitlabGetError)
32873287
def repository_tree(self, path='', ref='', recursive=False, **kwargs):
32883288
"""Return a list of files in the repository.

0 commit comments

Comments
 (0)