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

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

From
Junio C Hamano <junkio@cox.net>
Date
Apr 26, 2006, 07:50 UTC
Message-ID
<7virowrd1y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e2n72h$aqe$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 6 quoted lines
> Do I understand correctly that toplevel (master project) commits have tree
> which points to combined tree, and "bind" links which points to the
> subprojects commits whose trees make up the overall tree, or does the
> master tree points to tree containing only toplevel files (overall Makefile
> for example, INSTALL or README for the whole project including
> subprojects,...)?

The plan for "bind commit" was to have the toplevel commit to contain:

	tree -- this covers the whole tree including subprojects
        parent -- list of parents in the toplevel project
        bind -- commit object name of subproject, plus which
	        directory to graft its tree onto.

And a subproject commit, unless it contains subsubproject, would look like just an ordinary commit. Its tree would match the entry in the tree the toplevel commit at the path in "bind" line of the top-level commit.

Some reading material, from newer to older:
  * http://www.kernel.org/git/?p=git/git.git;a=blob;hb=todo;f=Subpro.txt
  This talks about the overall "vision" on how the user-level
  interaction might look like, with a sketch on how the core-level
  would help Porcelain to implement that interaction.  Most of the
  core-level support described there is in the "bind commit"
  changes, except "update-index --bind/-unbind" to record the
  information on bound subprojects in the index file.
  * http://thread.gmane.org/gmane.comp.version-control.git/15072
  This was the thread that led to the above proposal.
  * http://thread.gmane.org/gmane.comp.version-control.git/14486
  This is older.  It touches an alternative "gitlink" approach,
  which I meant to prototype but never got around to.
  Surprisingly, these two threads are mostly noise-free and
  literally every message is worth reading.

Some old but working core-side code is available at jc/bind branch of public git.git repository.

> BTW. I have lately stumbled upon (somewhat Vault and Subversion biased)
>  http://software.ericsink.com/Beyond_CheckOut_and_CheckIn.html
> Read about Share and Pin -- it's about subprojects (when you edit out the
> flawed "branch as folder" approach of author).

Not really. You can easily do that by checking out another project in a separate subdirectory.

My private working area for git.git is structured like this:
	/home/junio/git.junio/.git
        		      Makefile
                              COPYING
                              Documentation/
                              ...
                              Meta/.git
                              Meta/TODO
                              Meta/Make
                              Meta/TO
                              Meta/WI
                              ...
Notice two .git directories?  That's right.  

The top-level .git repository has the familiar branches like "maint", "master", "next", "pu", in addition to various topic branches.

Meta/.git is a separate repository that is a clone of "todo" branch of git.git repository. The top-level .git repository does not even have "todo" branch. I just happen to push into the same public repository git.git at kernel.org from these two separate repositories.

The Meta/ repository is "pinned" to a specific version, without having any funky "Pin feature", no thank you, because I have full control of when I update what is checked out in the Meta/ directory.

What you _might_ want is a reverse of Pinning. Sometimes, you would want to make sure subproject part is at least this version or later to build other parts of the whole.

But for my particular "Meta/" directory, I do not need such a linkage. The major reason I do not keep TODO in the main project is because it is supposed to be a task list for me across "maint", "master" and "next". I do not want it to fluctuate whenever I work on different branches.

-jc
Previous: Jakub NarebskiNext: Jakub Narebski
Message 18 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.