Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkgs/build-support/fetchgit/nix-prefetch-git
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ checkout_ref(){
fi

if test -n "$ref"; then
# --depth option is ignored on http repository.
clean_git fetch ${builder:+--progress} --depth 1 origin +"$ref" || return 1
# --depth option fails on dumb http repositories.
clean_git fetch ${builder:+--progress} --depth 1 origin +"$ref" ||
clean_git fetch ${builder:+--progress} origin +"$ref" ||
return 1
clean_git checkout -b "$branchName" FETCH_HEAD || return 1
else
return 1
Expand Down