]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: make sed command that generates config-list.h portable.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 2 Jun 2025 22:31:32 +0000 (15:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2025 00:21:49 +0000 (17:21 -0700)
The OpenBSD 'sed' command does not support '\n' to represent newlines in
sed expressions. This leads to the follow compiler error:

    In file included from builtin/help.c:15:
    ./config-list.h:282:18: error: use of undeclared identifier 'n'
            "gitcvs.dbUser",n       "gitcvs.dbPass",
                            ^
    1 error generated.
    gmake: *** [Makefile:2821: builtin/help.o] Error 1

We can fix this by documenting related configuration variables
one-per-line instead of listing them separated by commas. This allows us
to remove the unportable part of the sed expression in
generate-configlist.sh.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/gitcvs.adoc
Documentation/config/http.adoc
generate-configlist.sh

index 02da427fd9743f995496233df942e37ac9736f37..31d7be3992b572e142082f9bbfddef9160727227 100644 (file)
@@ -47,7 +47,8 @@ gitcvs.dbDriver::
        May not contain double colons (`:`). Default: 'SQLite'.
        See linkgit:git-cvsserver[1].
 
-gitcvs.dbUser, gitcvs.dbPass::
+gitcvs.dbUser::
+gitcvs.dbPass::
        Database user and password. Only useful if setting `gitcvs.dbDriver`,
        since SQLite has no concept of database users and/or passwords.
        'gitcvs.dbUser' supports variable substitution (see
index 67393282fad57bb3a1d0e2c8b62b3416bfc031b7..9da5c298cc1d5ead4ff480e4bb05775b5f0743ab 100644 (file)
@@ -289,7 +289,8 @@ for most push problems, but can increase memory consumption
 significantly since the entire buffer is allocated even for small
 pushes.
 
-http.lowSpeedLimit, http.lowSpeedTime::
+http.lowSpeedLimit::
+http.lowSpeedTime::
        If the HTTP transfer speed, in bytes per second, is less than
        'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,
        the transfer is aborted.
index b06da53c8918196a465d4f37eb139274c549e044..9d2ad6165d60cd62f92476416dff9e6030dcad1f 100755 (executable)
@@ -19,7 +19,6 @@ EOF
        s/::$//;
        s/`//g;
        s/^.*$/ "&",/;
-       s/,  */",\n     "/g;
        p;};
 d' \
            "$SOURCE_DIR"/Documentation/*config.adoc \