From 65fa5c0f849fe4a1e3cb8e6af0086ef0748c28de Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 17 Feb 2021 17:57:13 +0000
Subject: [PATCH] generate-configlist.sh: Fix determinism issue

Currently git binaries are not entirely reproducible, at least partly
due to config-list.h differing in order depending on the system's
locale settings. Under different locales, the entries:

"sendemail.identity",
"sendemail.<identity>.*",

would differ in order for example and this leads to differences in
the debug symbols for the binaries.

This can be fixed by specifying the C locale for the sort in the
shell script generating the header.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Upstream-Status: Submitted [https://public-inbox.org/git/f029a942dd3d50d85e60bd37d8e454524987842f.camel@linuxfoundation.org/T/#u]
---
 generate-configlist.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generate-configlist.sh b/generate-configlist.sh
index dffdaad..cc35a21 100755
--- a/generate-configlist.sh
+++ b/generate-configlist.sh
@@ -15,7 +15,7 @@ static const char *config_name_list[] = {
 EOF
 	grep -h '^[a-zA-Z].*\..*::$' "$SOURCE_DIR"/Documentation/*config.adoc "$SOURCE_DIR"/Documentation/config/*.adoc |
 	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
-	sort |
+	LC_ALL=C sort |
 	sed 's/^.*$/	"&",/'
 	cat <<EOF
 	NULL,
