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

Re: [PATCH] userdiff: Add a builtin pattern for dts files

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2019, 18:34 UTC
Message-ID
<xmqq7ef7w0kg.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<16335abe-5e7e-fd7a-25f4-373f94e176e1@gmail.com>
Alban Gruin <alban.gruin@gmail.com> writes:
Show 9 quoted lines
> thank you for your patch.  I left a few comments below.
>
> Le 11/01/2019 à 22:51, Stephen Boyd a écrit:
>> The Linux kernel receives many patches to the devicetree files each
>> release. The hunk header for those patches typically show nothing,
>> making it difficult to figure out what node is being modified without
>> applying the patch or opening the file and seeking to the context. Let's
>> add a builtin 'dts' pattern to git so that users can get better diff
>> output on dts files when they use the diff=dts driver.
A sort of meta-question.

What is missing in the current git that prevents the folks involved in device-tree project from achieving what this patch tries to accomplish without having to wait the Git project to act on it? To put it another way, is it a symptom of a bad design that from time to time the Git project has to add built-in patterns?

Ability to ship arbitrary piece of text that you would normally place in .git/config is not exactly an answer to the above question, and will not happen as that has grave security implications.

But perhaps we can start accepting an in-tree config-like file whose contents are limited to verified-safe settings (e.g. "diff.*.xfuncname" and nothing else), so that projects can ship two files in-tree:

 - ".gitattributes" that says "*.dts diff=dts"
 - ".gitpreferences" that says "[diff "dts"] xfuncname=..." to
   define the pattern the patch under review adds.

without waiting for the next release of Git to add one more built-in pattern?

Anything that defines executable (e.g. "diff.*.command") should never be accepted as part of the in-tree config-like file (for two reasons: security and portability), but there should be some "obviously safe" subset of config settings that we can allow project to impose on its users, I hope.

Previous: Alban GruinNext: Alban Gruin
Message 3 of 7 in “userdiff: Add a builtin pattern for dts files”
  1. userdiff: Add a builtin pattern for dts filesStephen Boyd, Jan 11, 2019
  2. Alban GruinJan 13, 2019
  3. Junio C HamanoJan 14, 2019
  4. Alban GruinJan 17, 2019
  5. Stephen BoydJan 14, 2019
  6. Alban GruinJan 17, 2019
  7. Rob HerringJan 17, 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.