Re: [RFC PATCH] userdiff: ship built-in driver config file

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

 



On Wed, Jun 19, 2019 at 11:58 AM Jeff King <peff@xxxxxxxx> wrote:
>
> While having separate lines that get joined here does make the result
> easier to read, I think it creates some confusion. diff.*.xfuncname in a
> regular config file _doesn't_ behave this way (it's the usual
> last-one-wins, so we expect a single string). You've handled this
> specially in your code to read this file, but it's confusing because
> this test otherwise looks exactly like a config file. And thus somebody
> might be tempted to copy it to their config file and modify it, but it
> would not do what they expected.
>
> I don't recall how well our config parser copes with embedded newlines
> in values.  I.e., if it would be possible to write:
>
>   [diff "foo"]
>   xfuncname = "the pattern starts here...
>   and continues through newlines!"
>

If I recall correctly, the above version wouldn't work, but the
following version would:

[diff "foo"]
    xfuncname = "The pattern starts here..."
"and continues here! But the indentation looks ugly,"
"and we lose the ability to add comments inline (within pattern)"

Actually, at the very beginning, I was imaging some syntax like this:

[diff "foo"]
    xfuncname = "The pattern starts here..."
    ; using '+=' will continue the pattern above
    xfuncname += "and continues here!"
    ; a '=' symbol will start a new pattern
    xfuncname = "This is another pattern.."
    xfuncname += "and remember, last one always wins"

The existing config parser does not support "+=" though, which is a
nice feature to have in my opinion. Maybe there is a reason?

By the way, thanks for all the reviews! Especially when I found more
lines of reviews than lines of my code.

Best regards,
Boxuan



[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