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:30 UTC
Message-ID
<alpine.LFD.1.10.0807272206480.3486@nehalem.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.10.0807272148030.3486@nehalem.linux-foundation.org>
On Sun, 27 Jul 2008, Linus Torvalds wrote:
> 
> And it's why gitk can start printing out the history _before_ three 
> seconds has passed. And that's really really important.

Btw, the reason it's really really important is that "three seconds" can actually easily be "three minutes" - if the project is big, or if you simply don't have everything in the cache, so you actually need to do tons of IO to generate the whole history.

So every normal operation absolutely _must_ be incremental and not rely on any calculation of the whole history in order to then simplify it.

Of course, post-processing is fine for some things. For example, in the thread I pointed you to originally (see filter-branch + full-history in google, or look in some git archive) I suggested a post-processing of the merge history for filter-branch. I suspect it's very acceptable for _that_ kind of use to "batch" things up and not do them with partial knowledge.

But this incremental thing is why I for example suggest people should use "git gui blame" instead of "git blame" when looking for problems - because the latter cannot be done incrementally, and as a result can cause really irritating delays (exactly because it basically needs to synchronously walk back to the beginning of history).

The kernel repo, btw, is pretty small in this regard. The cases that caused much more pain were the insane KDE ones that were something like ten times the size. We've optimized things pretty aggressively, but...

Btw, if I sound irritated, it's because we had all these discussions about three _years_ ago when git got started. This is not a new issue. It's hard.

I've been pushing on people to do things incrementally very hard over the last few years because it's such a _huge_ usability issue.

For example, I've pointed you to the incremental nature of "gitk" as an example of how things should work, but that's actually fairly recent: it wasn't that long ago that "gitk" used to pass in "--topo-order" or "--date-order" to the core git revision machinery, and that actually is another of those "global" operations that you need the whole history for.

So gitk actually used to pause for three seconds (or ten. or thirty) before it would show the results. I'm really happy to report that Paul finally did the (trivial) topo-sort in gitk, meaning that he could re-sort it as necessary and keep things incremental. It was one of my biggest UI gripes for the longest time (and I wasted time adding a special "partial output mode" that gitk didn't even then end up using because Paul did things the right way).

Btw, from a git log viewer standpoint, the "merge history simplification" is all the exact same problem as the "--topo-order" flag is: you could use the (incremental and very verbose)

	git log --full-history --parents

output as the base-line, and then you could do the commit simplification of things interactively.

But "git log" itself cannot do it by default, since that would mean that git log itself would have to wait for the whole history to be generated.

That's because output to a pipe is fundamentally linear (ie it cannot "re-write" the things it has already shown as it finds a simplification: there is no incremental way to rewrite things "after the fact").

			Linus
Previous: Linus TorvaldsNext: Roman Zippel
Message 13 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.