Support --separate-git-dir option in Git module (#41712)

Make git module support --separate-git-dir option. When git version is higher than 1.7.5, use built-in --separate-git-dir option during the clone. When lower, adjust the location of git dir manually after clone to achieve the same effect.
This commit is contained in:
Zhikang Zhang
2018-08-17 10:43:04 -04:00
committed by GitHub
parent a66588129f
commit d7921b4d5b
4 changed files with 143 additions and 12 deletions

View File

@@ -11,6 +11,7 @@ git_archive_extensions:
checkout_dir: '{{ output_dir }}/git'
repo_dir: '{{ output_dir }}/local_repos'
separate_git_dir: '{{ output_dir }}/sep_git_dir'
repo_format1: 'https://github.com/jimi-c/test_role'
repo_format2: 'git@github.com:jimi-c/test_role.git'
repo_format3: 'ssh://git@github.com/jimi-c/test_role.git'