2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP-LOCAL-REPOS | create dirs
|
2017-01-06 22:38:53 +00:00
|
|
|
file:
|
2017-10-13 14:30:15 +00:00
|
|
|
name: "{{ item }}"
|
2017-01-06 22:38:53 +00:00
|
|
|
state: directory
|
|
|
|
with_items:
|
2017-10-13 14:30:15 +00:00
|
|
|
- "{{ repo_dir }}/minimal"
|
|
|
|
- "{{ repo_dir }}/shallow"
|
2017-01-06 22:38:53 +00:00
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP-LOCAL-REPOS | prepare minimal git repo
|
2017-01-06 22:38:53 +00:00
|
|
|
shell: git init; echo "1" > a; git add a; git commit -m "1"
|
|
|
|
args:
|
2017-10-13 14:30:15 +00:00
|
|
|
chdir: "{{ repo_dir }}/minimal"
|
2017-01-06 22:38:53 +00:00
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP-LOCAL-REPOS | prepare git repo for shallow clone
|
2017-01-06 22:38:53 +00:00
|
|
|
shell: |
|
|
|
|
git init;
|
|
|
|
echo "1" > a; git add a; git commit -m "1"; git tag earlytag; git branch earlybranch;
|
|
|
|
echo "2" > a; git add a; git commit -m "2";
|
|
|
|
args:
|
2017-10-13 14:30:15 +00:00
|
|
|
chdir: "{{ repo_dir }}/shallow"
|
2017-01-06 22:38:53 +00:00
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: SETUP-LOCAL-REPOS | set old hash var for shallow test
|
2017-01-06 22:38:53 +00:00
|
|
|
command: 'git rev-parse HEAD~1'
|
|
|
|
register: git_shallow_head_1
|
|
|
|
args:
|
2017-10-13 14:30:15 +00:00
|
|
|
chdir: "{{ repo_dir }}/shallow"
|