about summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/nix-prefetch-git
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2024-05-03 17:36:08 +0200
committerVladimír Čunát <v@cunat.cz>2024-05-03 17:36:08 +0200
commite96601ecf084d9d6a366a4f0da7f36479f67f81e (patch)
treedbfe3d477ed9bee7adb03c76ae5fecce043fb9bf /pkgs/build-support/fetchgit/nix-prefetch-git
parent1aae0909b02ffb4d0d4a45db322df7a8c9fdd34e (diff)
parent2544167a82ff99e00a8de68fa529701a30648128 (diff)
Merge #306080: staging-next 2024-04-22
Diffstat (limited to 'pkgs/build-support/fetchgit/nix-prefetch-git')
-rwxr-xr-xpkgs/build-support/fetchgit/nix-prefetch-git2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 7ac3dec91f7f4..0f41cbd6a265d 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"