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

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

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 12, 2005, 15:48 UTC
Message-ID
<2cfc403205051208483132921@mail.gmail.com>
In-Reply-To
<2cfc4032050512084426ea3d4d@mail.gmail.com>
| small clarification to algorithm, removed editing work area 
On 5/12/05, Jan Harkes <jaharkes@cs.cmu.edu> wrote:
Show 12 quoted lines
> On Thu, May 12, 2005 at 01:43:50PM +0200, Thomas Gleixner wrote:
> ....
> Your examples break if you consider additional merges where M syncs up a
> couple of times (f.i. at Rn-2) before M is merged back into R.
>
> What you seem to want won't be fixed by adding a repoid, you need to
> keep a list of all the commits you have already seen and append any new
> ones whenever you look at the history. If you look whenever you pull or
> merge the list will be in the total ordering that you seem to expect for
> your repository. But that is a porcelain thing.
>
> Jan

If committers always follow the convention that their previous local commit is nominated as the first (local) parent in the commit and commits from foreign repositories are listed after the first parent, can the chain of "local" parents be an effective proxy for repoid?

Consider first a graph where there are no more than 2 parents in a merge
Ln
|     \
Ln-1  Fn
|         |
Ln-2  Fn-1
|       /
Ln-3
Thomas would like to sort this as:

Ln Fn Fn-1 Ln-1 Ln-2 Ln-3

So, use this algorithm:
1. Merge result comes first.
2. For each foreign parent:
    - sort the graph between the foreign parent and the merge base
(not including merge base) according to his algorithm using the
foreign parent as the starting
point of the algorithm. Append the result into the list.
3. Append the merge base to the list.

Admittedly the order for foreign parent for N-way merges is somewhat arbitrary but a committer could probably make a choice that "works" in most cases by specifying the foreign parents in a "sensible" order.

Of course, this relies on a committer always nominating the local parent first, but that wouldn't be hard to enforce in the porcelain layer.

jon.
-- 
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/
Previous: Jon SeymourNext: Jon Seymour
Message 46 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.