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 24, 2013, 05:45 UTC
Message-ID
<20130924054520.GC5875@sigill.intra.peff.net>
In-Reply-To
<20130923213729.GE9464@google.com>
On Mon, Sep 23, 2013 at 02:37:29PM -0700, Jonathan Nieder wrote:
Show 6 quoted lines
> >> Add --order-sensitive to get historical unstable behaviour.
> 
> The --order-sensitive option seems confusing.  How do I use it to
> replicate a historical patch-id?  If I record all options that might
> have influenced ordering (which are those?) then am I guaranteed to
> get a reproducible result?  

Yes, I have the same complaint. I'd much rather the classic mode be given a name of some sort, and then have a "--patch-id-mode=classic" parameter (or probably some better name) that sets all of the parameters. Then you know that two implementations using "classic" should get the same output, and so forth if we have to tweak it again.

Show 10 quoted lines
> So I would prefer either of the following over the above:
> 
>  a) When asked to compute the patch-id of a seekable file, use the
>     current streaming implementation until you notice a filename that
>     is out of order.  Then start over with sorted hunks (for example
>     building a table of offsets within the patch for each hunk to
>     support this).
> 
>     When asked to compute the patch-id of an unseekable file, stream
>     to a temporary file under $GIT_DIR to get a seekable file.

This would mean that everybody, whether they care about compatibility or not, would have to pay the price to spool to $GIT_DIR, right? That's not great, as most cases would not care.

Show 5 quoted lines
>  b) Unconditionally use the new patch-id definition that is stable
>     under permutation of hunks.  If and when someone complains that
>     this invalidates their old patch-ids, they can work on adding a
>     nice interface for getting the old-style patch-ids.  I suspect it
>     just wouldn't come up.

I think I'd prefer this one. The "--patch-id-mode" above is how I would do it, and in general when we are potentially breaking compatibility, it's nice to anticipate and give an escape hatch. But I do find it reasonably unlikely that this will come up, so maybe this is a good time to practice YAGNI.

-Peff
Previous: Jonathan NiederNext: Michael S. Tsirkin
Message 24 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.