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

Re: [RFC] [PATCH 0/5] Implement 'prior' commit object links

From
Sam Vilain <sam@vilain.net>
Date
Apr 25, 2006, 23:19 UTC
Message-ID
<444EAE7C.5010402@vilain.net>
In-Reply-To
<7vwtde2q1z.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
>> 2. revising published commits / re-basing
>>
>>    This is what "stg" et al do.  The tools allow you to commit,
>>    rewind, revise, recommit, fast forward, etc.
>>    
>>
>
>stg wants to have a link to the fork-point commit.  I do not
>know if it is absolutely necessary (you might be able to figure
>it out using merge-base, I dunno).
>  
>

"stg pull" and "stg pick" could conceivably link individual patches in a patchset to their precedent in a previous series. This would make looking at the evolution of individual patches over time more feasible.

Show 8 quoted lines
>>    In this case, the "prior" link would point to the last revision of
>>    a patch.  Tools would probably
>>    
>>
>
>Probably what...???
>  
>

...probably support this as an explicit operation - ie "publish", so that winding whilst developing is not tracked.

Show 14 quoted lines
>> 3. sub-projects
>>
>>    In this case, the commit on the "main" commit line would have a
>>    "prior" link to the commit on the sub-project.  The sub-project
>>    would effectively be its own head with copied commits objects on
>>    the main head.
>>    
>>
>
>You say you can have only one "prior" per commit, which makes
>this unsuitable to bind multiple subprojects into a larger
>project (the earlier "bind" proposal allows zero or more).
>  
>

It would still support that. Each commit to the sub-project involves a change to the tree of the "main" commit line (a copy of the commit into a sub-directory of it). The advantage is that the "tree" in the main commit is the combined tree, you don't need to treat the case specially to just get the contents out.

This is kind of like how SVK works by default - you have one local repository, inside which you track remote repositories. Each commit on the upstream repository is copied individually into your own repository. So your local repository numbers easily reach into tens of thousands (small numbers in git land, I know) while the upstream revisions are just in the thousands.

Show 20 quoted lines
>There may be some narrower concrete use case for which you can
>devise coherent semantics, and teach tools and humans how to
>interpret such inter-commit relationship that are _not_
>parent-child ancestry.  For example, if you have one special
>link to point at a "cherry-picked" commit, rebasing _could_ take
>advantage of it.  When your side branch tip is at D, and commit
>D has "this was cherry-picked from commit E" note, and if you
>are rebasing your work on top of F:
>
>        A---B---C---D
>       /
>  o---o---E---F
>
>the tool can notice that F can reach E and carry forward only A,
>B, and C on top of F, omitting D.  So having such a link might
>be useful.  But if that is what you are going to do, I do not
>think you would want to conflate that with other inter-commit
>relationships, such as "previous hydra cap".
>  
>

Right, I see the problem, a strong argument for a more generic solution as you presented.

Sam.
Previous: Junio C HamanoNext: Jakub Narebski
Message 11 of 63 in “Implement 'prior' commit object links”
  1. Sam VilainApr 25, 2006
  2. 1/5 add 'prior' link in commit structureSam Vilain, Apr 25, 2006
  3. Junio C HamanoApr 25, 2006
  4. 2/5 git-merge-base: follow 'prior' links to find merge basesSam Vilain, Apr 25, 2006
  5. Junio C HamanoApr 25, 2006
  6. 4/5 git-commit-tree: add support for priorSam Vilain, Apr 25, 2006
  7. 5/5 git-commit: add --prior to set prior linkSam Vilain, Apr 25, 2006
  8. 3/5 commit.c: parse 'prior' linkSam Vilain, Apr 25, 2006
  9. Sam VilainApr 25, 2006
  10. Junio C HamanoApr 25, 2006
  11. Sam VilainApr 25, 2006
  12. Jakub NarebskiApr 26, 2006
  13. Jakub NarebskiApr 26, 2006
  14. [OT] Re: [RFC] [PATCH 0/5] Implement 'prior' commit object linksJunio C Hamano, Apr 26, 2006
  15. Jakub NarebskiApr 26, 2006
  16. Junio C HamanoApr 26, 2006
  17. Jakub NarebskiApr 26, 2006
  18. Junio C HamanoApr 26, 2006
  19. Jakub NarebskiApr 26, 2006
  20. Junio C HamanoApr 26, 2006
  21. Jakub NarebskiApr 26, 2006
  22. Sam VilainApr 26, 2006
  23. Jakub NarebskiApr 25, 2006
  24. Junio C HamanoApr 25, 2006
  25. Jakub NarebskiApr 25, 2006
  26. seanApr 25, 2006
  27. Linus TorvaldsApr 25, 2006
  28. Linus TorvaldsApr 25, 2006
  29. seanApr 25, 2006
  30. Linus TorvaldsApr 25, 2006
  31. Andreas EricssonApr 26, 2006
  32. Jakub NarebskiApr 26, 2006
  33. Jakub NarebskiApr 25, 2006
  34. Linus TorvaldsApr 25, 2006
  35. Jakub NarebskiApr 25, 2006
  36. Linus TorvaldsApr 25, 2006
  37. Linus TorvaldsApr 25, 2006
  38. Jakub NarebskiApr 25, 2006
  39. seanApr 25, 2006
  40. Linus TorvaldsApr 25, 2006
  41. seanApr 25, 2006
  42. Linus TorvaldsApr 25, 2006
  43. Jakub NarebskiApr 25, 2006
  44. Linus TorvaldsApr 25, 2006
  45. Jakub NarebskiApr 25, 2006
  46. Jason RiedyApr 25, 2006
  47. seanApr 25, 2006
  48. Linus TorvaldsApr 25, 2006
  49. Junio C HamanoApr 25, 2006
  50. Linus TorvaldsApr 25, 2006
  51. Junio C HamanoApr 25, 2006
  52. Linus TorvaldsApr 25, 2006
  53. Jakub NarebskiApr 26, 2006
  54. Junio C HamanoApr 25, 2006
  55. Linus TorvaldsApr 25, 2006
  56. Jakub NarebskiApr 25, 2006
  57. Sam VilainApr 25, 2006
  58. Linus TorvaldsApr 25, 2006
  59. seanApr 25, 2006
  60. Jakub NarebskiApr 25, 2006
  61. Junio C HamanoApr 25, 2006
  62. Jakub NarebskiApr 25, 2006
  63. Jakub NarebskiApr 29, 2006

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.