Skip to content
Merged
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
13 changes: 9 additions & 4 deletions pkgs/build-support/fetchgit/nix-prefetch-git
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ fi
init_remote(){
local url=$1
clean_git init --initial-branch=master
# Disable maintenance: it's not useful for a short-lived clone, and
# background maintenance causes non-deterministic builds.
# https://github.com/NixOS/nixpkgs/issues/524215
clean_git config maintenance.auto false
clean_git remote add origin "$url"
if [ -n "$sparseCheckout" ]; then
git config remote.origin.partialclonefilter "blob:none"
Expand Down Expand Up @@ -518,6 +514,15 @@ HOME="$tmpHomePath"
unset XDG_CONFIG_HOME
export GIT_CONFIG_NOSYSTEM=1


# Disable maintenance: it's not useful for a short-lived clone, and
# background maintenance causes non-deterministic builds.
# https://github.com/NixOS/nixpkgs/issues/524215
export GIT_CONFIG_COUNT=$(( ${GIT_CONFIG_COUNT:-0} + 1 ))
# Not the best but generic enough that it will work with `impureEnvVars`
export "GIT_CONFIG_KEY_$(( GIT_CONFIG_COUNT - 1 ))=maintenance.auto"
export "GIT_CONFIG_VALUE_$(( GIT_CONFIG_COUNT - 1 ))=false"

if test -n "$builder"; then
test -n "$out" -a -n "$url" -a -n "$rev" || usage
if test -n "$rootDir"; then
Expand Down
Loading