From f5deff5137f8807cd9a0364bf3580c2853951126 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 27 Aug 2015 04:02:09 +0300 Subject: [PATCH] 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 "^{}". 2. This revision is not fetched by default. --- pkgs/build-support/fetchgit/nix-prefetch-git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index ceedf313f28..22d46257075 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -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 }