From 0dd68afd38c20b12ae81216533fe4c718c4b0680 Mon Sep 17 00:00:00 2001 From: topilski Date: Fri, 13 Oct 2017 08:28:14 +0300 Subject: [PATCH] Remove .git file in clone --- base/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/utils.py b/base/utils.py index 129d17e..48c546b 100644 --- a/base/utils.py +++ b/base/utils.py @@ -136,7 +136,9 @@ def git_clone(url, current_dir): common_git_clone_init_line = ['git', 'submodule', 'update', '--init', '--recursive'] subprocess.call(common_git_clone_init_line) - return os.path.join(current_dir, cloned_dir) + dir = os.path.join(current_dir, cloned_dir) + shutil.rmtree(os.path.join(dir, '.git')) + return dir def symlink_force(target, link_name):