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

Re: git-format-patch should include a checksum

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2010, 01:25 UTC
Message-ID
<7v4om8xrs7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.00.1001262006150.1681@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> writes:
> FWIW, I do manually edit both incoming and outgoing patches from time to 
> time as well.
Me three.
> I think what would be even more useful at first is to find out why 
> corrupted patches still apply.
Exactly.  That is why I asked that question at the very beginning.
> ... Just 
> applying the patch to that blob and confirming it matches the postimage 
> SHA1 should cover many cases already.

That would work when you are/have the sole authority (so contributors won't send patches based on some other trees), you push out often (to keep the length of the patch queue contributors keep short).

That would make it more likely that others base their work on what you published, and send patches from their base version all the way (not skipping "this is what I sent earlier but haven't been accepted nor pushed out"). Otherwise it will be unlikely that you have the object recorded as the preimage. Often when I receive follow-up patches from people, some are based on what was committed by me (possibly with tweaks), and some others are based on what was seen on the list (lacking the tweaks), yet some others are based on random other versions. I'll have preimages only in the first case.

Usually while editing incoming patch text (not log message), you mostly touch postimage, but when fixing up a diff that was based on a bit stale version, you need to touch preimage as well. In these cases, the blob object names recorded in the patch wouldn't be very useful.

Previous: Nicolas PitreNext: Juliusz Chroboczek
Message 8 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.