fetchgit: Support fetching signed tags over dumb http transport

This commit is contained in:
Scott Worley 2024-01-24 19:45:57 -08:00 committed by sternenseemann
parent 9c035c4419
commit 697bba9892
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

@ -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=";
};
}