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

Re: [PATCH] [RFD] Add repoid identifier to commit

From
TGThomas Gleixner <tglx@linutronix.de>
Date
May 12, 2005, 20:47 UTC
Message-ID
<1115930845.11872.79.camel@tglx>
In-Reply-To
<7vvf5ogxdu.fsf@assigned-by-dhcp.cox.net>
On Thu, 2005-05-12 at 10:35 -0700, Junio C Hamano wrote:
> Thanks for a very clear explanation.  The situation is
> intriguing in that both R and M after converging end up with
> exactly the same HEAD with the same set of objects but still
> would want to see history leading to the HEAD differently.

Yes, thats what I wanted to achieve first hand with the repository id. I think my first attempt is far from perfect and I agree with hpa on having a .git/repoid file.

Show 8 quoted lines
> I wonder what happens to a third person S, who pulls from both R
> and M.  What does S see?  
> Does the commit order observed by S depend on which one S pulls
> from first?  That is, if S pulls from R then at that point Mn-1
> and Mn comes after Rn-1 in S's history?  And after that what
> hapens if S pulls from M (which is obviously a no-op except that
> it would update .git/refs/heads/M)?  Does the history for S
> change?

That's an interesting question. Of course, if you change the head you see the tree from a different POV, but you can detect this when S pulls from M after a pull from R. So the tool can ask the user, if he really wants to change the commit order or not. You might even argue that they could refuse to do the head change

Show 7 quoted lines
> The answer to the above could be "the merge order history is per
> tree and not something to be exported or given away to other
> trees", in which case it may make sense from S's point of view
> that Mn and Rn-1 are compares solely based on their commit
> timestamps.  You will get consistent history and switching which
> tree is being tracked would not change the history.  Is the goal
> here to give the merge order history from R and M to S?

The goal from my side is to preserve the merge order history of R, M and S in the individual way of commit order per repository, which includes the merge order R->S, M->S or the other way round. See above

Show 6 quoted lines
> If that is not needed, then you can record in an auxiliary file
> that is local to each tree the timestamp of when merge happened
> in that tree along with set of foreign commit objects, and teach
> rev-tree or rev-list to read from that auxiliary file and use
> that timestamp for foreign commit objects instead of commit time
> recorded in them when sorting by time is needed.

As I said before timestamps can be a horrid source of information. Also if you keep a list of commits merges and head forwards in timed order it is simple to read the repository history, but in case of corruption you have to reconstruct it manually. There is no way to do so with the information available.

Repository id's can be lost, but are simple to replace as they are recorded in the commit blob.

tglx
Previous: SeanNext: Sean
Message 55 of 74 in “[RFD] Add repoid identifier to commit”
  1. [RFD] Add repoid identifier to commitThomas Gleixner, May 11, 2005
  2. SeanMay 11, 2005
  3. Thomas GleixnerMay 11, 2005
  4. SeanMay 11, 2005
  5. Thomas GleixnerMay 11, 2005
  6. SeanMay 11, 2005
  7. Thomas GleixnerMay 11, 2005
  8. SeanMay 11, 2005
  9. Thomas GleixnerMay 11, 2005
  10. SeanMay 11, 2005
  11. Thomas GleixnerMay 12, 2005
  12. SeanMay 12, 2005
  13. Thomas GleixnerMay 12, 2005
  14. SeanMay 12, 2005
  15. David WoodhouseMay 12, 2005
  16. SeanMay 12, 2005
  17. Thomas GleixnerMay 12, 2005
  18. David WoodhouseMay 12, 2005
  19. SeanMay 12, 2005
  20. SeanMay 12, 2005
  21. H. Peter AnvinMay 11, 2005
  22. Thomas GleixnerMay 11, 2005
  23. H. Peter AnvinMay 11, 2005
  24. SeanMay 11, 2005
  25. H. Peter AnvinMay 12, 2005
  26. SeanMay 12, 2005
  27. Thomas GleixnerMay 12, 2005
  28. Junio C HamanoMay 12, 2005
  29. Thomas GleixnerMay 12, 2005
  30. SeanMay 12, 2005
  31. Thomas GleixnerMay 12, 2005
  32. SeanMay 12, 2005
  33. Thomas GleixnerMay 12, 2005
  34. SeanMay 12, 2005
  35. Thomas GleixnerMay 12, 2005
  36. SeanMay 12, 2005
  37. Thomas GleixnerMay 12, 2005
  38. SeanMay 12, 2005
  39. Thomas GleixnerMay 12, 2005
  40. SeanMay 12, 2005
  41. SeanMay 12, 2005
  42. David WoodhouseMay 12, 2005
  43. SeanMay 12, 2005
  44. Jan HarkesMay 12, 2005
  45. Jon SeymourMay 12, 2005
  46. Jon SeymourMay 12, 2005
  47. Jon SeymourMay 12, 2005
  48. Jan HarkesMay 12, 2005
  49. Jon SeymourMay 12, 2005
  50. Jon SeymourMay 12, 2005
  51. Junio C HamanoMay 12, 2005
  52. SeanMay 12, 2005
  53. Junio C HamanoMay 12, 2005
  54. SeanMay 12, 2005
  55. Thomas GleixnerMay 12, 2005
  56. SeanMay 12, 2005
  57. Thomas GleixnerMay 12, 2005
  58. SeanMay 12, 2005
  59. Junio C HamanoMay 12, 2005
  60. Thomas GleixnerMay 12, 2005
  61. SeanMay 12, 2005
  62. Dmitry TorokhovMay 12, 2005
  63. Thomas GleixnerMay 12, 2005
  64. H. Peter AnvinMay 12, 2005
  65. H. Peter AnvinMay 12, 2005
  66. Joel BeckerMay 12, 2005
  67. Thomas GleixnerMay 12, 2005
  68. Jon SeymourMay 13, 2005
  69. Thomas GleixnerMay 13, 2005
  70. Petr BaudisMay 13, 2005
  71. H. Peter AnvinMay 13, 2005
  72. Petr BaudisMay 13, 2005
  73. Jon SeymourMay 13, 2005
  74. Jon SeymourMay 14, 2005

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.