{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pip/issues/2400","labels_url":"https://api.github.com/repos/pypa/pip/issues/2400/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pip/issues/2400/comments","events_url":"https://api.github.com/repos/pypa/pip/issues/2400/events","html_url":"https://github.com/pypa/pip/pull/2400","id":56680775,"number":2400,"title":"Ensure all tags are fetched when updating git repo","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-05T15:00:17Z","updated_at":"2015-04-07T09:10:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pypa/pip/pulls/2400","html_url":"https://github.com/pypa/pip/pull/2400","diff_url":"https://github.com/pypa/pip/pull/2400.diff","patch_url":"https://github.com/pypa/pip/pull/2400.patch"},"body":"We ran into a case in which we had a `requirements.txt` like:\r\n```\r\n...\r\n-e git+ssh://git@github.com/foobar/foobar.git@v0.4.0#egg=foobar\r\n...\r\n```\r\n\r\nAnd, when upgrading *foobar*, `requirements.txt` becomes:\r\n```\r\n...\r\n-e git+ssh://git@github.com/foobar/foobar.git@v0.4.1#egg=foobar\r\n...\r\n```\r\n\r\nThen `pip install --upgrade -r requirements.txt` fails with these lines in our logs:\r\n```\r\n[10:50:53] Command /usr/bin/git reset --hard -q v0.4.1 failed with error code 128 in ...\r\n[10:50:53] Storing debug log for failure in /home/ubuntu/.pip/pip.log\r\n[10:50:54]   Could not find a tag or branch 'v0.4.1', assuming commit.\r\n[10:50:54] fatal: ambiguous argument 'v0.4.1': unknown revision or path not in the working tree.\r\n[10:50:54] Use '--' to separate paths from revisions\r\n```\r\n\r\nSo it seems that `git fetch` didn't fetch the v0.4.1 tag.\r\n\r\nWhat about having an explicit `git fetch --tags` to ensure all tags will be fetched?"},"comment":{"url":"https://api.github.com/repos/pypa/pip/issues/comments/90476419","html_url":"https://github.com/pypa/pip/pull/2400#issuecomment-90476419","issue_url":"https://api.github.com/repos/pypa/pip/issues/2400","id":90476419,"user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=3","gravatar_id":"","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T09:10:03Z","updated_at":"2015-04-07T09:10:03Z","body":"This needs rebased, it also needs a test to ensure that this still continues to work into the future. Otherwise this looks fine to me."}}