Skip to content
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

Fix shallow fetch by checking out FETCH_HEAD #1077

Merged
merged 1 commit into from
Jul 8, 2019

Conversation

asottile
Copy link
Member

@asottile asottile commented Jul 8, 2019

I don't think this was actually succeeding before:

$ bash -x t2.sh
+ set -euxo pipefail
+ git --version
git version 2.20.1 (Apple Git-117)
+ rm -rf repo1
+ git init repo1
Initialized empty Git repository in /private/tmp/x/repo1/.git/
+ cd repo1
+ git remote add origin https://github.com/asottile/pyupgrade
+ git -c protocol.version=2 fetch origin v1.20.1 --depth=1
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 38 (delta 4), reused 27 (delta 3), pack-reused 0
Unpacking objects: 100% (38/38), done.
From https://github.com/asottile/pyupgrade
 * tag               v1.20.1    -> FETCH_HEAD
+ git checkout v1.20.1
error: pathspec 'v1.20.1' did not match any file(s) known to git

@asottile asottile merged commit 927b2ab into master Jul 8, 2019
@asottile asottile deleted the shallow_fetch_fetch_head branch July 8, 2019 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant