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

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2016, 06:00 UTC
Message-ID
<xmqqfuugyg3y.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160419170624.GA3999@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> I mean that if you save any old patch-ids from "git patch-id", they
> won't match up when compared with new versions of git. We can probably
> ignore it, though. This isn't the first time that patch-ids might have
> changed, and I think the advice is already that one should not count on
> them to be stable in the long term.

Another thing that this *will* break is the patch signature upload protocol k.org uses to allow Linus, Greg, et al. on the road with limited hotel wifi bandwidth to prepare patch-X-test1.gz and patch-X-test1.sign file. They can locally tag X-test1, prepare "git diff X X-test1 | gzip -n >patch-X-test1.gz" and sign the result, and upload _only_ the detached signature after pushing.

They can tell k.org, when uploading the detached signature, to recreate the patchfile by running the same "git diff" to save the bandwidth of sending the same thing twice (as they have to "push" anyway, having to send the generated patch is a pure overhead).

Having said all that, kup(1) users are already warned that the textual diff produced by "git diff-tree -p" (which is mentioned in the documentation of the tool) varies across versions of Git and the above "optimization" would not work unless both ends have the same version of Git, so it may not be too big an issue for them. They have already been burned once when we corrected "git archive" output in the past (they obviously have the same optimization to sign tarballs, and the kup(1) mechanism relies to have byte-for-byte identical output).

Previous: Jeff KingNext: Junio C Hamano
Message 17 of 20 in “xdiff: implement empty line chunk heuristic”
  1. 0/2 xdiff: implement empty line chunk heuristicStefan Beller, Apr 18, 2016
  2. 1/2 xdiff: add recs_match helper functionStefan Beller, Apr 18, 2016
  3. 2/2 xdiff: implement empty line chunk heuristicStefan Beller, Apr 18, 2016
  4. Jacob KellerApr 18, 2016
  5. Junio C HamanoApr 18, 2016
  6. Jeff KingApr 19, 2016
  7. Stefan BellerApr 19, 2016
  8. Jeff KingApr 19, 2016
  9. Stefan BellerApr 19, 2016
  10. Stefan BellerApr 19, 2016
  11. Jeff KingApr 19, 2016
  12. Jacob KellerApr 19, 2016
  13. Junio C HamanoApr 19, 2016
  14. Michael S. TsirkinApr 20, 2016
  15. Junio C HamanoApr 20, 2016
  16. Jeff KingApr 20, 2016
  17. Junio C HamanoApr 20, 2016
  18. Junio C HamanoApr 19, 2016
  19. Junio C HamanoApr 18, 2016
  20. Stefan BellerApr 18, 2016

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.