summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git2
-rw-r--r--pkgs/build-support/fetchgit/tests.nix7
2 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 7ac3dec91f7f..0f41cbd6a265 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -166,7 +166,7 @@ checkout_hash(){
clean_git fetch -t ${builder:+--progress} origin || return 1
local object_type=$(git cat-file -t "$hash")
- if [[ "$object_type" == "commit" ]]; then
+ if [[ "$object_type" == "commit" || "$object_type" == "tag" ]]; then
clean_git checkout -b "$branchName" "$hash" || return 1
elif [[ "$object_type" == "tree" ]]; then
clean_git config user.email "nix-prefetch-git@localhost"
diff --git a/pkgs/build-support/fetchgit/tests.nix b/pkgs/build-support/fetchgit/tests.nix
index 23e5fa299010..f3fcd9a578de 100644
--- a/pkgs/build-support/fetchgit/tests.nix
+++ b/pkgs/build-support/fetchgit/tests.nix
@@ -72,4 +72,11 @@
leaveDotGit = true;
fetchSubmodules = true;
};
+
+ dumb-http-signed-tag = testers.invalidateFetcherByDrvHash fetchgit {
+ name = "dumb-http-signed-tag-source";
+ url = "https://git.scottworley.com/pub/git/pinch";
+ rev = "v3.0.14";
+ sha256 = "sha256-bd0Lx75Gd1pcBJtwz5WGki7XoYSpqhinCT3a77wpY2c=";
+ };
}