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

Re: Gitweb and submodules

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 30, 2007, 00:09 UTC
Message-ID
<200707300209.03531.jnareb@gmail.com>
In-Reply-To
<20070729163747.GJ31114MdfPADPa@greensroom.kotnet.org>
On Sun,29 July 2007, Sven Verdoolaege wrote:
> On Sat, Jul 28, 2007 at 10:39:28PM +0200, Jakub Narebski wrote:
>> On Sat, 28 July 2007, Sven Verdoolaege wrote:
>>> On Sat, Jul 28, 2007 at 12:29:16PM +0200, Jakub Narebski wrote:
Show 8 quoted lines
>> I am thinking about the following sequence to search for submodule
>> objects:
>> 
>> From $GIT_DIR/config:
>>   submodule.$name.objects (absolute or relative to gitdir of superproject)
>>   submodule.$name.gitdir  (absolute or relative to gitdir of superproject)
> 
> Do we really need both of these?

We need only location of object database for projects. The submodule does not need full GIT_DIR structure, with refs, config, etc.

So no, I'm not sure if we want both. They are equivalent to setting
GIT_OBJECT_DIRECTORY and GIT_DIR for submodule, respectively.
 
>>   submodule.$name.url     (to find GIT_DIR, if it is local filesystem URL)
>> 
>> If there is working directory, from .gitmodules file in top level
>> of working directory:
Or the .git/config of superproject.
Show 6 quoted lines
>>   submodule.$name.path/.git (relative to toplevel of working directory)
> 
> Having a relative path for the URL in .gitmodules in a public repo
> doesn't seem very useful to me.  I know it's only meant as a default
> value, but if it is a relative path, then it won't work for
> anyone cloning the superproject.

Erm, it should be relative path in .git/config (as in example in the t/t7400-submodule-basic.sh IIRC). And this is purely local matter.

-- 
Jakub Narebski
Poland
Previous: Sven VerdoolaegeNext: Sven Verdoolaege
Message 7 of 9 in “Gitweb and submodules”
  1. Jakub NarebskiJul 27, 2007
  2. Sven VerdoolaegeJul 27, 2007
  3. Jakub NarebskiJul 28, 2007
  4. Sven VerdoolaegeJul 28, 2007
  5. Jakub NarebskiJul 28, 2007
  6. Sven VerdoolaegeJul 29, 2007
  7. Jakub NarebskiJul 30, 2007
  8. Sven VerdoolaegeJul 30, 2007
  9. Lars HjemliJul 27, 2007

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.