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

Re: [RFC] Light-weight checkouts via ".gitlink"

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Dec 8, 2006, 23:40 UTC
Message-ID
<200612090040.17169.Josef.Weidendorfer@gmx.de>
In-Reply-To
<200612090024.17065.jnareb@gmail.com>
On Saturday 09 December 2006 00:24, Jakub Narebski wrote:
Show 10 quoted lines
> > That is not possible:
> > .gitignore file has its own meaning inside of the light-weight
> > checkout aka submodule, as this directory is the root directory of
> > a git checkout.
> 
> I have forgot about that. Right.
> 
> The only possibility would be to use GIT_DIR/info/excludes with path
> to submodule, and this conflict with the ability to rename and move
> submodules.

Yes. This whole .gitlink thing more or less is about trying to avoid as far as possible any path configuration in the supermodule which would have to be changed when the user moves or even deletes the submodule. Exactly for the latter, we want the GITDIR for submodules better be separate.

Show 11 quoted lines
> >> GIT_DIR = path to base git repository
> >> it is equivalent to setting the following:
> >> 
> >> GIT_INDEX_FILE = path to index file
> >> GIT_OBJECT_DIRECTORY = path to object directory
> >> GIT_HEAD_FILE = path to HEAD file
> >> GIT_REFS_DIRECTORY = path to refs directory
> > 
> > AFAIK the latter two do not exist yet, or do they?
> 
> They do not exist; perhaps they should for completeness.

Actually, I am fine with allowing them in .gitlink. This makes the whole thing much more flexible.

Show 7 quoted lines
> [...] 
> > It is enough if GITDIR and NAME is given. With GITDIR_REAL after the
> > smart lookup, e.g. GIT_INDEX_FILE would default to $GITDIR_REAL/external/$NAME
> > and so on.
> 
> Not $GITDIR_REAL/submodules/<name>/index (or modules instead of
> submodules)?

Ooops, yes. I am not actually sure what's the best name here: "external", "submodule", ... ? I thought the the SVN name also fits for the submodule case. The submodule is independent, and possibliy comes from an external git repository.

Show 12 quoted lines
> >> NAME = name
> >> should match "name subdirectory" entry in modules file in superproject.
> > 
> > Yes.
> > This would be in my next proposal about how to build the submodule support
> > on light-checkouts ;-)
> 
> I have thought that with "each submodule as separate repository" approach
> to submodules the modules file would have module name and either
> subdirectory in which submodule resides, or GIT_DIR of submodule. And
> this file could be generated on checkout... which doesn't survive closer
> scrutiny.

Of course, that is a more simple approach. But I think the .gitlink thing really is more flexible without being more complex.

Show 10 quoted lines
> > Ah, yes, I see. Perhaps this makes sense with absolute paths:
> > 
> > 	/home/user/repos/.../linux
> 
> You mean that the above means to check the following paths:
> 
>   /home/user/repos/linux
>   /home/user/linux
>   /home/linux
>   /linux
No.
> not the searching subdirectories of /home/user/repos for linux
> directory (there can be many)?
Yes. But you can scratch this.
Previous: Jakub NarebskiNext: Josef Weidendorfer
Message 5 of 8 in “[RFC] Light-weight checkouts via ".gitlink"”
  1. Josef WeidendorferDec 8, 2006
  2. Jakub NarebskiDec 8, 2006
  3. Josef WeidendorferDec 8, 2006
  4. Jakub NarebskiDec 8, 2006
  5. Josef WeidendorferDec 8, 2006
  6. Josef WeidendorferDec 8, 2006
  7. Jakub NarebskiDec 8, 2006
  8. Josef WeidendorferDec 9, 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.