about summary refs log tree commit diff
path: root/third_party/git/generate-configlist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/generate-configlist.sh')
-rwxr-xr-xthird_party/git/generate-configlist.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/third_party/git/generate-configlist.sh b/third_party/git/generate-configlist.sh
new file mode 100755
index 0000000000..8692fe5cf4
--- /dev/null
+++ b/third_party/git/generate-configlist.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+echo "/* Automatically generated by generate-configlist.sh */"
+echo
+
+print_config_list () {
+	cat <<EOF
+static const char *config_name_list[] = {
+EOF
+	grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
+	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
+	sort |
+	sed 's/^.*$/	"&",/'
+	cat <<EOF
+	NULL,
+};
+EOF
+}
+
+echo
+print_config_list