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

Re: Bizarre missing changes (git bug?)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 28, 2008, 05:00 UTC
Message-ID
<alpine.LFD.1.10.0807272148030.3486@nehalem.linux-foundation.org>
In-Reply-To
<Pine.LNX.4.64.0807280141140.6791@localhost.localdomain>
On Mon, 28 Jul 2008, Roman Zippel wrote:
Show 7 quoted lines
> 
> Of course I did:
> 
> $ git log --parents --name-only --full-history lib/vsprintf.c | grep -e ^commit | wc -l
> 5929
> 
> This is same amount of commits as for gitk.

OF COURSE it's the same numbr of commits. That's what gitk uses. That's what you *have* to use.

You don't actually understand how git works, do you?
> These are the same 20 commits (with parents) from a simple git-log.

So what? The point I tried to make is that _any_ algorithm that gets the above case right by actually simplifying the commits "post facto" probably gets any case right. You tried to find some more interestign case, but you missed the whole point - even the "simple" case is quite hard enough.

IOW, don't look for anythign more difficult, because if you do, you don't understand the problem to begin with!

Do you not understand that the problem is that "post facto" isn't actually acceptable? Have you looked at all at the revision reading code? Hmm?

The regular merge simplification does the simplification _before_ it has gathered the whole history of commits. And that is really really important.

And I realize that you don't even seem to understand the difference. But to simplify it for you, let me give you a challenge. Try this:

	time sh -c "git log --parents --full-history lib/vsprintf.c | head"

and if it takes noticeably more than a tenth of a second on my machine, you lose.

Because that's roughly what it takes right now, and it's what means that effectively the normal log is instantaneous. It's why you can start looking at the log without waiting for three seconds, even though the _full_ log may take three seconds to compute (ok, on my machine it takes 2.3s, but whatever).

And it's why gitk can start printing out the history _before_ three seconds has passed. And that's really really important.

Try it. Really. Just do "gitk lib/vsprintf.c" and look at how it does things incrementally. It doesn't wait for a couple of seconds and then show things.

Absolutely EVERYTHING in git would be totally trivial if you did it all based on generating first the whole history, and then simplifying it from there. But git would be unusably slow in real life, and it would scale _horribly_ badly with history size.

So _all_ the normal code actually generates the history INCREMENTALLY, and it absolutely _has_ to work that way.

			Linus
Previous: Roman ZippelNext: Linus Torvalds
Message 12 of 58 in “Bizarre missing changes (git bug?)”
  1. Tim HarperJul 21, 2008
  2. Linus TorvaldsJul 21, 2008
  3. Tim HarperJul 21, 2008
  4. Tim HarperJul 21, 2008
  5. Roman ZippelJul 26, 2008
  6. Linus TorvaldsJul 26, 2008
  7. Roman ZippelJul 27, 2008
  8. Linus TorvaldsJul 27, 2008
  9. Roman ZippelJul 27, 2008
  10. Linus TorvaldsJul 27, 2008
  11. Roman ZippelJul 28, 2008
  12. Linus TorvaldsJul 28, 2008
  13. Linus TorvaldsJul 28, 2008
  14. Roman ZippelJul 29, 2008
  15. Martin LanghoffJul 29, 2008
  16. Roman ZippelJul 30, 2008
  17. Martin LanghoffJul 30, 2008
  18. Linus TorvaldsJul 30, 2008
  19. Linus TorvaldsJul 30, 2008
  20. Junio C HamanoJul 30, 2008
  21. Junio C HamanoJul 31, 2008
  22. Linus TorvaldsJul 31, 2008
  23. revision traversal: show full history with merge simplificationJunio C Hamano, Jul 31, 2008
  24. Junio C HamanoJul 31, 2008
  25. Linus TorvaldsJul 31, 2008
  26. revision traversal: show full history with merge simplificationJunio C Hamano, Jul 31, 2008
  27. Linus TorvaldsJul 31, 2008
  28. Junio C HamanoJul 31, 2008
  29. Junio C HamanoAug 1, 2008
  30. Linus TorvaldsAug 1, 2008
  31. Junio C HamanoAug 1, 2008
  32. Jakub NarebskiJul 30, 2008
  33. Linus TorvaldsJul 29, 2008
  34. Linus TorvaldsJul 29, 2008
  35. Roman ZippelJul 29, 2008
  36. David KastrupJul 29, 2008
  37. Linus TorvaldsJul 29, 2008
  38. Roman ZippelJul 30, 2008
  39. Kevin BallardJul 30, 2008
  40. Linus TorvaldsJul 30, 2008
  41. Jeff KingJul 29, 2008
  42. Roman ZippelJul 29, 2008
  43. Olivier GalibertJul 29, 2008
  44. Jeff KingJul 29, 2008
  45. Linus TorvaldsJul 29, 2008
  46. Roman ZippelJul 30, 2008
  47. Linus TorvaldsJul 30, 2008
  48. Jeff KingJul 30, 2008
  49. Linus TorvaldsJul 30, 2008
  50. Roman ZippelJul 30, 2008
  51. Kevin BallardJul 30, 2008
  52. Linus TorvaldsJul 30, 2008
  53. Linus TorvaldsJul 30, 2008
  54. Jeff KingJul 30, 2008
  55. Martin LanghoffJul 27, 2008
  56. Roman ZippelJul 28, 2008
  57. Alex RiesenJul 21, 2008
  58. Linus TorvaldsJul 21, 2008

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.