-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git - in Ansible 2.1 switching a shallow clone from tag to branch fails #19074
Comments
From @robinro on June 7, 2016 9:9 @adamchainz thanks for the report. You already found the problem in the code: I don't have much time for the next 2 weeks to work on issues. Maybe you can come up with a fix and open a PR? I'd be happy to review it. There is currently another bug open with changes to the same function: ansible/ansible-modules-core#3794 |
From @ansibot on July 30, 2016 16:36 @ansible, ping. This issue is still waiting on your response. |
From @danwashusen on August 26, 2016 0:31 I think I'm also seeing the same just trying to update a shallow clone... |
From @ansibot on August 26, 2016 0:33 @ansible, ping. This issue is still waiting on your response. |
From @robinro on August 26, 2016 15:43 @danwashusen |
From @ansibot on September 12, 2016 16:58 @ansible, ping. This issue is still waiting on your response. |
From @ansibot on October 6, 2016 14:34 @ansible, ping. This issue is still waiting on your response. |
From @ansibot on October 22, 2016 8:51 @ansible, ping. This issue is still waiting on your response. |
From @ansibot on November 6, 2016 9:46 @ansible, ping. This issue is still waiting on your response. |
From @ansibot on November 22, 2016 9:54 @ansible, ping. This issue is still waiting on your response. |
From @ansibot on December 9, 2016 15:38 This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo. |
I believe this is @adamchainz For me your example runs fine on the current devel version. Please close this issue if it works for you. |
Works for me 👌 |
I'm experiencing the same issue on ansible 2.1.5.0 when both switching a shallow cloned repo from tag to branch or switching a shallow cloned repo from tag to another tag. The issue seems to be fixed in devel, is it going to be backported to 2.1 given this task is about 2.1? |
@hezbucho things don't tend to get backported but you can backport yourself by copying the git module to |
OK, thanks 👌 |
From @adamchainz on June 1, 2016 14:54
ISSUE TYPE
COMPONENT NAME
git module
ANSIBLE VERSION
CONFIGURATION
Vanilla
OS / ENVIRONMENT
Happens on both OS X and Ubuntu with different versions of git (1.8 and 1.9)
SUMMARY
Updating a shallow clone based on a tag to one based on a branch fails
STEPS TO REPRODUCE
Run this with
ansible-playbook -i 127.0.0.1, ~/tmp/test.yml; rm /tmp/testclone
EXPECTED RESULTS
On Ansible 2.0.2.0, it works fine:
ACTUAL RESULTS
On Ansible 2.1.0.0, I get:
It looks like
fetch
has started assuming that if we're updating to a remote branch, we must currently be on a branch, as per lines 530-532:or that
get_head_branch
should work, but doesn't, when we're on a tag. N.B. this is the contents of the.git
directory after the clone from tag:Copied from original issue: ansible/ansible-modules-core#3817
The text was updated successfully, but these errors were encountered: