nix-prefetch-git: pull all tags from remote when checkouting by revision

Close #9790.
This fixes checkouting for a nasty combination:

1. To be checkouted is a revision which corresponds to tag in a form "<tag>^{}".
2. This revision is not fetched by default.
This commit is contained in:
Nikolay Amiantov 2015-08-27 04:02:09 +03:00 committed by Vladimír Čunát
parent 3ce3539cdc
commit f5deff5137

View File

@ -109,7 +109,7 @@ checkout_hash(){
hash=$(hash_from_ref $ref)
fi
git fetch ${builder:+--progress} origin || return 1
git fetch -t ${builder:+--progress} origin || return 1
git checkout -b $branchName $hash || return 1
}