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

RFE: git-patch-id should handle patches without leading "diff"

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Dec 7, 2018, 18:19 UTC
Message-ID
<20181207181942.GA6411@pure.paranoia.local>
Hi, all:

Every now and again I come across a patch sent to LKML without a leading "diff a/foo b/foo" -- usually produced by quilt. E.g.:

https://lore.kernel.org/lkml/20181125185004.151077005@linutronix.de/

I am guessing quilt does not bother including the leading "diff a/foo b/foo" because it's redundant with the next two lines, however this remains a valid patch recognized by git-am.

If you pipe that patch via git-patch-id, it produces nothing, but if I put in the leading "diff", like so:

diff a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
then it properly returns "fb3ae17451bc619e3d7f0dd647dfba2b9ce8992e".

Can we please teach git-patch-id to work without the leading diff a/foo b/foo, same as git-am?

Best, -K

Next: Ævar Arnfjörð Bjarmason
Message 1 of 6 in “RFE: git-patch-id should handle patches without leading "diff"”
  1. Konstantin RyabitsevDec 7, 2018
  2. Ævar Arnfjörð BjarmasonDec 7, 2018
  3. Jonathan NiederDec 7, 2018
  4. Ævar Arnfjörð BjarmasonDec 7, 2018
  5. Jonathan NiederDec 7, 2018
  6. Junio C HamanoDec 8, 2018

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.