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

Re: More precise tag following

From
Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Date
Jan 27, 2007, 17:12 UTC
Message-ID
<45BB87EB.7010200@fs.ei.tum.de>
In-Reply-To
<Pine.LNX.4.63.0701271728020.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 8 quoted lines
> Ah, I think you fall in the "files matter" trap.
> 
> My point is: for what git does it does not need information which might or 
> might not be present, but it derives that information which was there from 
> the beginning: the ancestry path.
> 
> Many people don't use or even need blame. And what you want to introduce 
> would affect them, too.
Many people do not use colored diffs.  Introducing colored diff support affects them, too.  In which way?  Additional command line switches, for example.  I don't think that's a big deal, and neither is a reverse map to create object-level DAGs.
Show 5 quoted lines
> That is why I proposed a cache (of precomputed data): you don't have to 
> change _anything_ in the file format, but you can speed the processes up 
> -- locally! -- if they matter to you.
> 
> Which means it works on old repositories, too.
Maybe I was not clear enough.  I do not propose to change the file format, but to extend the information stored.  In which way whatsoever.  However I think that keeping this information along with trees in pack files seems very sensible.  Or along pack files, whatever.
Show 14 quoted lines
>> It might be sufficient for git.git, but certainly not for projects with 
>> a long history.  we are talking KDE, FreeBSD, OOo, something like this.  
>> They each got about 400k commits.  It takes literally *minutes* to get a 
>> rev-list or a blame for a certain path.  The algorithm simply does not 
>> scale.  And this has nothing to do with superior output, because hg does 
>> it in O(num_of_file_revs), so it *can* be done.
> 
> But can hg do it that fast, if you track code _movement_ between files? I 
> doubt so.
> 
> I don't know if git can, at the moment, but even if it cannot, in future 
> versions this may well be possible, exactly because we do _not_ rely on 
> metadata to be stored in the objects, which can be derived from the 
> history as-is anyway.
Please don't take the mentioning of hg as an attack on git.  You don't have to shoot back.  It was just to illustrate that this information can be used to speed up certain operations considerably.  Besides, I don't think that hg's repo format prevents it to do things which git can do.  Just some things might be less elegant or easy.
> The important part is that you should not change the file format when you 
> do not have to.
Do doubt.  Especially not in a way which breaks backwards compatibility.
> Rather, calculate the information you need from the existing data, and if 
> you can reuse it, store it locally. _That_ is flexibility.
Of course this is flexibility.  But this also means that every consumer has to do this for every repo.  Wouldn't it be nice to have it done one time and then stored in a pack?
> It also gives me a warm fuzzy feeling that no bogus "auxillary 
> information" can be introduced by fetching from somewhere else. (It does 
> not matter if intended or unintended.)
I agree on that.
> And if something is wrong with that "auxillary information", it can be 
> regenerated correctly, without touching the real data -- the commit 
> ancestry.
Yes, it always can be regenerated.  I never said it should be made part of the core structure.
Show 8 quoted lines
>>> Besides, we already introduced an orthogonal historisation by reflogs, 
>>> and your method would not cope gracefully with that, would it?
>> I don't see how reflogs can play into this.  After all we're talking 
>> about the series of commits the blob experienced to get into its current 
>> state, not the series of actions it took this repo to contain this blob.
> My point was that you want to introduce a reverse mapping onto the history 
> DAG. But this claims that there is only one history you can possibly look 
> at. This assumption is wrong.
Then you are reading it wrong.  It is just a way to speed up the common way of operation.  That doesn't mean that other ways stop working.  git-rev-list does one thing and you wouldn't call it not being gracefull, just because it doesn't operate on reflogs?
Show 6 quoted lines
> It can make a lot of sense to git-blame a change on a pull, maybe because 
> you don't want to fix it yourself, but throw it all back to the lieutnant 
> whom you pulled that part from.
> 
> You could find that pull (in theory; I don't think it works right now) 
> with git-blame walking the _reflogs_ instead of the _commit history_.
Fair enough.  Nobody said that this wouldn't work anymore.  I just said that working on commit history could be sped up considerably.
cheers
  simon
-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 13 of 92 in “More precise tag following”
  1. Junio C HamanoJan 26, 2007
  2. Junio C HamanoJan 26, 2007
  3. Shawn O. PearceJan 27, 2007
  4. Junio C HamanoJan 27, 2007
  5. Jeff KingJan 27, 2007
  6. Nicolas PitreJan 27, 2007
  7. Simon 'corecode' SchubertJan 27, 2007
  8. Johannes SchindelinJan 27, 2007
  9. Simon 'corecode' SchubertJan 27, 2007
  10. Jakub NarebskiJan 27, 2007
  11. Linus TorvaldsJan 27, 2007
  12. Johannes SchindelinJan 27, 2007
  13. Simon 'corecode' SchubertJan 27, 2007
  14. Johannes SchindelinJan 27, 2007
  15. Simon 'corecode' SchubertJan 27, 2007
  16. Nicolas PitreJan 27, 2007
  17. Linus TorvaldsJan 27, 2007
  18. Linus TorvaldsJan 27, 2007
  19. Junio C HamanoJan 27, 2007
  20. Linus TorvaldsJan 27, 2007
  21. Junio C HamanoJan 28, 2007
  22. git-blame --porcelain: quote filename in c-style when needed.Junio C Hamano, Jan 28, 2007
  23. git-blame --incremental: don't use pagerRené Scharfe, Jan 28, 2007
  24. Junio C HamanoJan 28, 2007
  25. Junio C HamanoJan 28, 2007
  26. René ScharfeJan 29, 2007
  27. git blame --progressJunio C Hamano, Jan 29, 2007
  28. Simon 'corecode' SchubertJan 29, 2007
  29. Alex RiesenJan 29, 2007
  30. Matthias LederhoferJan 29, 2007
  31. Junio C HamanoJan 29, 2007
  32. René ScharfeJan 29, 2007
  33. Linus TorvaldsJan 29, 2007
  34. Junio C HamanoJan 30, 2007
  35. Linus TorvaldsJan 28, 2007
  36. Junio C HamanoJan 28, 2007
  37. Linus TorvaldsJan 28, 2007
  38. Junio C HamanoJan 28, 2007
  39. document 'blame --incremental'Junio C Hamano, Jan 28, 2007
  40. Junio C HamanoJan 28, 2007
  41. Jeff KingJan 28, 2007
  42. Junio C HamanoJan 30, 2007
  43. Shawn O. PearceJan 30, 2007
  44. Linus TorvaldsJan 30, 2007
  45. Junio C HamanoJan 28, 2007
  46. Shawn O. PearceJan 29, 2007
  47. Junio C HamanoJan 29, 2007
  48. Shawn O. PearceJan 29, 2007
  49. Linus TorvaldsJan 29, 2007
  50. Simon 'corecode' SchubertJan 29, 2007
  51. Theodore TsoJan 29, 2007
  52. Linus TorvaldsJan 29, 2007
  53. Jakub NarebskiJan 29, 2007
  54. Shawn O. PearceJan 29, 2007
  55. Jakub NarebskiJan 29, 2007
  56. Shawn O. PearceFeb 9, 2007
  57. David KågedalJan 31, 2007
  58. David KågedalJan 31, 2007
  59. Peter EriksenJan 31, 2007
  60. David KågedalJan 31, 2007
  61. Peter EriksenJan 31, 2007
  62. Jakub NarebskiJan 31, 2007
  63. David KågedalJan 31, 2007
  64. Simon 'corecode' SchubertJan 27, 2007
  65. Johannes SchindelinJan 27, 2007
  66. Simon 'corecode' SchubertJan 27, 2007
  67. Johannes SchindelinJan 27, 2007
  68. Jakub NarebskiJan 27, 2007
  69. Linus TorvaldsJan 27, 2007
  70. Linus TorvaldsJan 27, 2007
  71. Jakub NarebskiJan 27, 2007
  72. Linus TorvaldsJan 27, 2007
  73. Chris LeeJan 27, 2007
  74. Theodore TsoJan 28, 2007
  75. Linus TorvaldsJan 28, 2007
  76. David LangJan 28, 2007
  77. Nicolas PitreJan 29, 2007
  78. Linus TorvaldsJan 29, 2007
  79. Nicolas PitreJan 29, 2007
  80. Chris LeeJan 29, 2007
  81. Eric WongJan 29, 2007
  82. Eric WongJan 30, 2007
  83. Eric WongJan 30, 2007
  84. Eric WongJan 30, 2007
  85. Jakub NarebskiJan 27, 2007
  86. Jeff KingJan 27, 2007
  87. Linus TorvaldsJan 27, 2007
  88. Jeff KingJan 27, 2007
  89. Theodore TsoJan 28, 2007
  90. Randal L. SchwartzJan 28, 2007
  91. Jeff KingJan 28, 2007
  92. Shawn O. PearceJan 28, 2007

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.