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

Re: [PATCH] diff: add a config option to control orderfile

From
Jeff King <peff@peff.net>
Date
Sep 17, 2013, 20:56 UTC
Message-ID
<20130917205615.GA20178@sigill.intra.peff.net>
In-Reply-To
<20130917203807.GA22059@redhat.com>
On Tue, Sep 17, 2013 at 11:38:07PM +0300, Michael S. Tsirkin wrote:
Show 5 quoted lines
> > A problem with both schemes, though, is that they are not
> > backwards-compatible with existing git-patch-id implementations.
> 
> Could you clarify?
> We never send patch IDs on the wire - how isn't this compatible?

I meant that you might be comparing patch-ids generated by different implementations, or across time. There are no dedicated tools to do so, but it is very easy to do so with standard tools like "join".

For example, you can do:
  patch_ids() {
    git rev-list "$1" |
    git diff-tree --stdin -p |
    git patch-id |
    sort
  }
  patch_ids origin..topic1 >us
  patch_ids origin..topic2 >them
  join us them | cut -d' ' -f2-3

to get a list of correlated commits between two branches. If the "them" was on another machine with a different implementation (or is saved from an earlier time), your patch-ids would not match.

It may be esoteric enough not to worry about, though. By far the most common use of patch-ids is going to be in a single "rev-list --cherry-pick" situation where you are trying to omit commits during a rebase.

I am mostly thinking of the problems we had with the "kup" tool, which expected stability across diffs that would be signed by both kernel.org. But as far as I know, they do not use patch-id. More details in case you are curious (including me arguing that we should not care, and it is kup's problem!) are here:

  http://thread.gmane.org/gmane.comp.version-control.git/192331/focus=192424

rerere is mentioned in that thread, but I believe that it does its own hash, and does not rely on patch-id.

-Peff
Previous: Michael S. TsirkinNext: Michael S. Tsirkin
Message 17 of 32 in “diff: add a config option to control orderfile”
  1. diff: add a config option to control orderfileMichael S. Tsirkin, Aug 31, 2013
  2. Junio C HamanoSep 3, 2013
  3. Michael S. TsirkinSep 3, 2013
  4. Michael S. TsirkinSep 15, 2013
  5. Michael S. TsirkinSep 15, 2013
  6. Junio C HamanoSep 17, 2013
  7. Michael S. TsirkinSep 17, 2013
  8. Junio C HamanoSep 17, 2013
  9. Michael S. TsirkinSep 17, 2013
  10. Junio C HamanoSep 17, 2013
  11. Michael S. TsirkinSep 17, 2013
  12. Michael S. TsirkinSep 17, 2013
  13. Michael S. TsirkinSep 17, 2013
  14. Jeff KingSep 17, 2013
  15. Michael S. TsirkinSep 17, 2013
  16. Michael S. TsirkinSep 17, 2013
  17. Jeff KingSep 17, 2013
  18. Michael S. TsirkinSep 17, 2013
  19. Jeff KingSep 17, 2013
  20. Junio C HamanoSep 17, 2013
  21. Michael S. TsirkinSep 19, 2013
  22. Michael S. TsirkinSep 23, 2013
  23. Jonathan NiederSep 23, 2013
  24. Jeff KingSep 24, 2013
  25. Michael S. TsirkinSep 24, 2013
  26. Jonathan NiederSep 24, 2013
  27. Michael S. TsirkinSep 24, 2013
  28. Jonathan NiederSep 24, 2013
  29. Michael S. TsirkinSep 24, 2013
  30. Jonathan NiederSep 24, 2013
  31. Michael S. TsirkinSep 17, 2013
  32. Michael S. TsirkinSep 21, 2013

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.