Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Fix git shallow update #3794

Merged
merged 3 commits into from Jun 9, 2016
Merged

Conversation

robinro
Copy link
Contributor

@robinro robinro commented May 30, 2016

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

source_control/git.py

ANSIBLE VERSION

devel

SUMMARY

Fix #3782, which was introduced by f1bacc1.

Fetch (updating a repo) failed silently when depth is given and version==HEAD.

This needs to be cherry-picked to 2.1-stable too since it break ansible-pull for people not specifying a version, i.e. the minimal example.

@gregdek
Copy link
Contributor

gregdek commented May 30, 2016

Thanks @robinro for this PR. This module is maintained by the Ansible core team, so it can take a while for patches to be reviewed. Thanks for your patience.

Core team: please review according to guidelines (http://docs.ansible.com/ansible/developing_modules.html#module-checklist) and comment with 'needs_revision' or merge as appropriate.

[This message brought to you by your friendly Ansibull-bot.]

Robin Roth added 3 commits June 6, 2016 10:27
fixes ansible#3782
git support for `--depth` did not fully work in old git versions (before 1.8.2)
fall back to full clones/fetches on those versions
robinro pushed a commit to robinro/ansible that referenced this pull request Jun 6, 2016
Older git versions don't treat the --depth option correctly.
While the git module tried to work around this and introduced subtle
bugs, ansible/ansible-modules-core#3794 falls back to full checkouts.
Don't run the tests then.
@abadger abadger merged commit c26eb12 into ansible:devel Jun 9, 2016
abadger pushed a commit that referenced this pull request Jun 9, 2016
* remove unused variables

* fetch branch name instead of HEAD

fix #3782, which was introduced by f1bacc1

* disable git depth option for old git versions

fixes #3782
git support for `--depth` did not fully work in old git versions (before 1.8.2)
fall back to full clones/fetches on those versions
@abadger
Copy link
Contributor

abadger commented Jun 9, 2016

Merged to devel and stable-2.1 branches.

abadger pushed a commit to ansible/ansible that referenced this pull request Jun 9, 2016
* add git shallow fetch test

covers ansible/ansible-modules-core#3782

updating a repo with depth=1 fails silently if version==HEAD

* disable git shallow tests for old git versions

Older git versions don't treat the --depth option correctly.
While the git module tried to work around this and introduced subtle
bugs, ansible/ansible-modules-core#3794 falls back to full checkouts.
Don't run the tests then.
abadger added a commit that referenced this pull request Jun 9, 2016
@abadger
Copy link
Contributor

abadger commented Jun 9, 2016

@robinro -- Had to revert this because it broke integration tests. Want to take a look and then resubmit? (I'm back home from pycon now so feel free to ping me in IRC when it's ready.)

@robinro robinro mentioned this pull request Jun 10, 2016
abadger pushed a commit to abadger/ansible-modules-core that referenced this pull request Jun 17, 2016
* remove unused variables

* fetch branch name instead of HEAD

fix ansible#3782, which was introduced by f1bacc1

* disable git depth option for old git versions

fixes ansible#3782
git support for `--depth` did not fully work in old git versions (before 1.8.2)
fall back to full clones/fetches on those versions
abadger added a commit to abadger/ansible-modules-core that referenced this pull request Jun 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ansible-pull: Shallow clone broken in 2.1.0.0-1
3 participants