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

Re: Subprojects tasks

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 17, 2006, 14:29 UTC
Message-ID
<200612171529.03165.jnareb@gmail.com>
In-Reply-To
<20061217134848.GH12411@admingilde.org>
Martin Waitz wrote:
> On Sun, Dec 17, 2006 at 02:01:09PM +0100, Jakub Narebski wrote:
Show 11 quoted lines
>> Well, in the .gitlink proposal you could specify GIT_DIR for checkout,
>> or separately: GIT_OBJECT_DIRECTORY, GIT_INDEX_FILE, GIT_REFS_DIRECTORY
>> (does not exist yet), GIT_HEAD_FILE (does not exist yet, and I suppose
>> it wouldn't be easy to implement it). By the way, that's why I'm for
>> .gitlink name for the file, not .git -- this way .gitlink can "shadow"
>> what's in .git, for example specifying in a smart way where to search
>> (where to find) object database, but HEAD and index would be stored
>> together with the checked out directory in .git
> 
> What about .git/link or something?
> (Obviously without the capability to change GIT_DIR)

Well, the .gitlink proposal at it is now (by Josef) serves both as a way to implement lightweight checkout (i.e. having additional working dir to some repository, or having working dir separate from bare repository), and as a way to have "smart" submodules (which you can move and rename) in submodules/subproject support.

Besides, I'd rather either use config file for this (core.link or
core.git_dir), or use .git/GIT_DIR.
 
Show 5 quoted lines
>> By the way, I'm rather partial to supermodule following HEAD in submodule,
>> not specified branch. First, I think it is easier from implementation
>> point of view: you don't have to remember which branch supermodule should
>> take submodule commits from; and this cannot be fixed branch name like
>> 'master'. 
[...]
> In the setup you described a git-checkout in the supermodule would have
> to switch to a different branch in the submodule, depending on the
> branchname which would have to be stored in the supermodule.
> This a lot more complex.

O.K. Now I understand why you prefer specified branch to HEAD. I have forgot that checkout must update submodule ref, and if we track HEAD we would have to remember the branch it pointed to.

By the way, should this ref be in submodule, or in supermodule, e.g. in refs/modules/<name>/HEAD? And there is a problam _what_ branch should be that.

Both approaches have advantages and disadvantages...
-- 
Jakub Narebski
Previous: Martin WaitzNext: Martin Waitz
Message 9 of 24 in “Subprojects tasks”
  1. Junio C HamanoDec 16, 2006
  2. Jakub NarebskiDec 16, 2006
  3. Martin WaitzDec 16, 2006
  4. Jakub NarebskiDec 16, 2006
  5. Josef WeidendorferDec 17, 2006
  6. Martin WaitzDec 17, 2006
  7. Jakub NarebskiDec 17, 2006
  8. Martin WaitzDec 17, 2006
  9. Jakub NarebskiDec 17, 2006
  10. Martin WaitzDec 17, 2006
  11. Josef WeidendorferDec 17, 2006
  12. Martin WaitzDec 18, 2006
  13. Josef WeidendorferDec 17, 2006
  14. Martin WaitzDec 18, 2006
  15. Josef WeidendorferDec 18, 2006
  16. Josef WeidendorferDec 17, 2006
  17. Sven VerdoolaegeDec 16, 2006
  18. Junio C HamanoDec 16, 2006
  19. Martin WaitzDec 16, 2006
  20. Sven VerdoolaegeDec 16, 2006
  21. Josef WeidendorferDec 17, 2006
  22. Alan ChandlerDec 17, 2006
  23. Jakub NarebskiDec 17, 2006
  24. Martin WaitzDec 17, 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.