From 2cd18d878615997e59ea39cedddfa0386e3f64e6 Mon Sep 17 00:00:00 2001 From: Zamentur aka ljf Date: Wed, 30 Nov 2016 18:26:40 +0100 Subject: [PATCH] [fix] Support git ynh app with submodules #533 (#174) --- src/yunohost/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 0be58f71..019bac89 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -1258,8 +1258,13 @@ def _fetch_app_from_git(app): url = url[:tree_index] branch = app[tree_index+6:] try: + # We use currently git 2.1 so we can't use --shallow-submodules + # option. When git will be in 2.9 (with the new debian version) + # we will be able to use it. Without this option all the history + # of the submodules repo is downloaded. subprocess.check_call([ - 'git', 'clone', '--depth=1', url, extracted_app_folder]) + 'git', 'clone', '--depth=1', '--recursive', url, + extracted_app_folder]) subprocess.check_call([ 'git', 'reset', '--hard', branch ], cwd=extracted_app_folder)