format: ignore system and user git config

This can cause failures if the user has configuration that is
incompatible with the version of git pinned in the format script.

Potentially it could have other undesired effects as well.

Fix #5736
This commit is contained in:
Terje Larsen 2025-01-03 11:22:01 +01:00 committed by GitHub
parent f4f8d09f90
commit 1e2a9d2d29
Failed to generate hash of commit

5
format
View file

@ -1,6 +1,11 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p git gnugrep gnused findutils nixfmt #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6616de389ed55fba6eeba60377fc04732d5a207c.tar.gz -i bash -p git gnugrep gnused findutils nixfmt
# Avoid being affected by system and user git config.
export GIT_CONFIG_NOSYSTEM=1
export HOME=
export XDG_CONFIG_HOME=
nixfmt_args=() nixfmt_args=()
files=() files=()