From dd59202068394618dd6d1de6efb89e8eb001bc0b Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 22 Nov 2024 15:01:31 +0100 Subject: [PATCH] resources: git: fix configuration with older git versions. Without that fix we have the following build error on PureOS 10 (byzantium): Submodule path 'util/nvidia/cbootimage': checked out '65a6d94dd5f442578551e0a81ecbe5235e673fd4' Committer identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got '[...]') ERROR: download/coreboot: Unable to apply patch '../../resources/coreboot/default/patches/0001-apple-macbook21-Set-default-VRAM-to-64MiB-instead-of.patch' for board 'default' on tree 'default'Committer identity unknown This is because PureOS 10 (byzantium) has git 2.30.2 and in PureOS, and since 'man git' doesn't show GIT_CONFIG_GLOBAL nor GIT_CONFIG_SYSTEM, git 2.30.2 doesn't understand these variables. Since git already has -c option, we use that instead. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- resources/git/git | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/git/git b/resources/git/git index be3128c..4fda7ff 100755 --- a/resources/git/git +++ b/resources/git/git @@ -19,6 +19,4 @@ # scripts: The make program compares the timestamps of the source code # and the binaries and if the source is more recent, rebuilds the # binaries. -GIT_CONFIG_GLOBAL="$(dirname "$0")"/gitconfig \ -GIT_CONFIG_SYSTEM="$(dirname "$0")"/gitconfig \ -git $@ +git -c "include.path=$(realpath "$(dirname "$0")"/gitconfig)" $@