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

Re: git-format-patch should include a checksum

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jan 27, 2010, 00:45 UTC
Message-ID
<alpine.LFD.2.00.1001261639550.17519@localhost.localdomain>
In-Reply-To
<fabb9a1e1001261526tc86c04em4c6ede23e109e66@mail.gmail.com>
On Wed, 27 Jan 2010, Sverre Rabbelier wrote:
> 
> I would imagine that the checksum is taken over just the actual commit
> message, perhaps author information, and use the patch-id for the
> patch itself, that way any comments after triple dash would be ignored, right?

That wouldn't work either. People can, should, and do add extra things to the message before applying it.

Examples of things I tend to add/change in the commit message:
 - add ack's from people in the same thread
 - add "Cc: stable@kernel.org" 
 - re-flow paragraphs when somebody uses a mailer that makes a mess of it.
 - occasionally fix spelling and grammar

so if there is some checksum that screws that up and requires me to then use a "--force" flag to apply it, that would be a bad thing.

I also do edit patches manually too. Having lived with people sending me patches for the last almost twenty years, I can edit patches in my sleep. Doing things like renaming new variables etc by search-and-replace on the patch may not be something I do _often_, but it happens.

In short, it might make sense to have some anti-corruption logic, but I suspect it needs a lot of thought.

		Linus
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 5 of 11 in “git-format-patch should include a checksum”
  1. Juliusz ChroboczekJan 26, 2010
  2. Sverre RabbelierJan 26, 2010
  3. Junio C HamanoJan 26, 2010
  4. Sverre RabbelierJan 26, 2010
  5. Linus TorvaldsJan 27, 2010
  6. Sverre RabbelierJan 27, 2010
  7. Nicolas PitreJan 27, 2010
  8. Junio C HamanoJan 27, 2010
  9. Juliusz ChroboczekJan 27, 2010
  10. Junio C HamanoJan 27, 2010
  11. Junio C HamanoJan 27, 2010

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.