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

Re: history damage in linux.git

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 21, 2016, 17:59 UTC
Message-ID
<CA+55aFzYWoeUq3MFgGtELaN-2sEc4j3egsAHZHVzK1CNPOqhKQ@mail.gmail.com>
In-Reply-To
<CA+55aFwOtyW7zLHdJND=FGBWKBfhQV95RPVRG5gcoRUrtGCrAQ@mail.gmail.com>

On Thu, Apr 21, 2016 at 10:43 AM, Linus Torvalds <torvalds@linux-foundation.org> wrote:

>
> In other words, I'm trying to convince people that my patch not only
> gives a good result, but that the "weight numbers" I use make some
> kind of conceptual sense from a complexity cost angle.

Basically, the patch approximates the numerical representation of the distance measure with the complexity of the suffix.

It's not a *true* length of the suffix (which does heavily favor first-parent use, kind of like the current code), but I think it's better than the pretty random "+65535" that the current git code has. That number is clearly just completely made up. The new numbers at least have some kind of logic behind them.

And the current code obviously does give really bad results. Picking the v4.6-rc1 tag as a base just because it happens to get a lot of first-parent traversals (800!) from one second-parent commit that is close to 4.6-rc1 is just obscene.

So the more I look at my patch, the more I go "it's a real improvement on the current situation".

That said, I do think that a much bigger conceptual change that actually does full traversal and be much more complicated might be the only "correct" solution.

So my patch is just a "improve heuristics" small fixlet rather than something optimal.

                 Linus
Previous: Linus TorvaldsNext: Jeff King
Message 21 of 24 in “history damage in linux.git”
  1. Olaf HeringApr 21, 2016
  2. Matthieu MoyApr 21, 2016
  3. Olaf HeringApr 21, 2016
  4. Matthieu MoyApr 21, 2016
  5. John KeepingApr 21, 2016
  6. Olaf HeringApr 21, 2016
  7. Matthieu MoyApr 21, 2016
  8. Andreas SchwabApr 21, 2016
  9. Linus TorvaldsApr 21, 2016
  10. Junio C HamanoApr 21, 2016
  11. Jeff KingApr 21, 2016
  12. Linus TorvaldsApr 21, 2016
  13. Stefan BellerApr 21, 2016
  14. Junio C HamanoApr 21, 2016
  15. Jeff KingApr 21, 2016
  16. Linus TorvaldsApr 21, 2016
  17. Johannes SchindelinApr 22, 2016
  18. Linus TorvaldsApr 21, 2016
  19. Junio C HamanoApr 21, 2016
  20. Linus TorvaldsApr 21, 2016
  21. Linus TorvaldsApr 21, 2016
  22. Jeff KingApr 21, 2016
  23. Junio C HamanoApr 21, 2016
  24. Linus TorvaldsApr 21, 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.