Re: [PATCH v5 4/4] config.txt: describe handling of whitespace further

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 21, 2024 at 2:06 AM Dragan Simic <dsimic@xxxxxxxxxxx> wrote:
> Make it more clear what the whitespace characters are in the context of git
> configuration files, and significantly improve the description of the leading
> and trailing whitespace handling, especially how it works out together with
> the presence of inline comments.
>
> Helped-by: Junio C Hamano <gitster@xxxxxxxxx>
> Helped-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
> Signed-off-by: Dragan Simic <dsimic@xxxxxxxxxxx>
> ---
>     Changes in v5:
>         - Rewrote the description of whitespace character handling again,
>           to eliminate ambiguity, as suggested by Eric Sunshine [3][4]
>         - Extended the improvements to the following paragraph as well, to
>           tie it all together, and to make it less ambiguous how to include
>           leading and trailing whitespace characters into configuration
>           option values, if desired so
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> @@ -63,16 +64,17 @@ the variable is the boolean "true").
> +Whitespace characters surrounding `name`, `=` and `value` are discarded.
> +Internal whitespace characters within 'value' are retained verbatim.
> +Comments starting with either `#` or `;` and extending to the end of line
> +are discarded.  A line that defines a value can be continued to the next
> +line by ending it with a backslash (`\`);  the backslash and the end-of-line
> +characters are discarded.
> +
> +If `value` needs to contain leading or trailing whitespace characters,
> +it must be enclosed in double quotation marks (`"`).  Inside double quotation
> +marks, double quote (`"`) and backslash (`\`) characters must be escaped:
> +use `\"` for `"` and `\\` for `\`.

Thanks. I find this discussion clearer than v4.

I don't have any further review comments on v5.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux