git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Jun 19, 2019, 18:42 UTC
Message-ID
<20190619184214.GB28145@sigill.intra.peff.net>
In-Reply-To
<CALM0=-=4b4j1brRN=Jnq4N+f+_vJXrL-JBAOxaLw0FgugNqX5w@mail.gmail.com>
On Wed, Jun 19, 2019 at 11:32:19PM +0800, LI, BO XUAN wrote:
Show 12 quoted lines
> >   [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)"

I don't think that works for our config files either (it does in C, of course).

Show 12 quoted lines
> 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?

There's no particular reason that feature isn't there, but in general we've been very hesitant to add syntactic changes to the config files, since there are many parsers in the wild. In general, today's files are compatible with ones from 2005.

-Peff
Previous: LI, BO XUAN
Message 12 of 12 in “userdiff: ship built-in driver config file”
  1. userdiff: ship built-in driver config fileBoxuan Li, Jun 17, 2019
  2. Johannes SixtJun 18, 2019
  3. Johannes SixtJun 18, 2019
  4. Jeff KingJun 19, 2019
  5. Johannes SixtJun 19, 2019
  6. Junio C HamanoJun 19, 2019
  7. Jeff KingJun 19, 2019
  8. Johannes SixtJun 20, 2019
  9. Junio C HamanoJun 19, 2019
  10. Jeff KingJun 19, 2019
  11. LI, BO XUANJun 19, 2019
  12. Jeff KingJun 19, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.