$ GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.bareRepository GIT_CONFIG_VALUE_0=explicit nix flake update
fatal: cannot use bare repository '/home/jeremy/.cache/nix/gitv3/187d2nqx8ha2q2vzr2q6by2plja74p4dd2xg4rkswavanxvz5jqc' (safe.bareRepository is 'explicit')
warning: could not update mtime for file '/home/jeremy/.cache/nix/gitv3/187d2nqx8ha2q2vzr2q6by2plja74p4dd2xg4rkswavanxvz5jqc/refs/heads/master': error: changing modification time of '"/home/jeremy/.cache/nix/gitv3/187d2nqx8ha2q2vzr2q6by2plja74p4dd2xg4rkswavanxvz5jqc/refs/heads/master"': No such file or directory
error:
… while updating the lock file of flake 'path:/tmp/tmp.X6deoqiq3K?lastModified=1724374035&narHash=sha256-PjN1yc5T4d3BAkqdQCyoKPGnF8s/OFMDwbQAxWDL%2BLs%3D'
… while updating the flake input 'nmd'
… while fetching the input 'git+https://git.sr.ht/~rycee/nmd'
error: resolving Git reference 'refs/heads/master': revspec 'refs/heads/master' not found
Describe the bug
nix flake update
fails for me with the git configsafe.bareRepository=explicit
.@mightyiam and I checked all the nix versions available in nixpkgs#nixVersions, the earliest in which this occurs is nix 2.20.8.
Steps To Reproduce
In a new directory, create a flake.nix that looks like this:
Then try to update inputs, note how this fails:
Expected behavior
I expect the above command to update my lockfile.
nix-env --version
outputnix (Nix) 2.24.3