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

Re: Egit/Jgit support for relocated .git directories

From
Chris Packham <judge.packham@gmail.com>
Date
Jun 28, 2012, 08:16 UTC
Message-ID
<4FEC12CE.6030603@gmail.com>
In-Reply-To
<CAJo=hJubPwt8y4NhhctMag5Yr6cbYXZ4sORTB1=FkTjQZhEsTQ@mail.gmail.com>
On 06/27/2012 03:40 AM, Shawn Pearce wrote:
Show 26 quoted lines
> On Tue, Jun 26, 2012 at 1:18 AM, Chris Packham <judge.packham@gmail.com> wrote:
>> This is a bit of a secondhand bug report/query so sorry if the details
>> are a bit sketchy.
>>
>> Since git 1.7.8:
>>
>> ``When populating a new submodule directory with "git submodule init",
>> the $GIT_DIR metainformation directory for submodules is created inside
>> $GIT_DIR/modules/<name>/ directory of the superproject and referenced
>> via the gitfile mechanism. This is to make it possible to switch
>> between commits in the superproject that has and does not have the
>> submodule in the tree without re-cloning.''
>>
>> I've had several colleagues at work tell me that with the relocated
>> $GIT_DIR the Egit integration with eclipse doesn't work. I can't really
>> qualify "doesn't work" but from what I've been told importing the
>> project works but blaming/annotating doesn't.
>>
>> I believe the gitfile mechanism isn't new but it possibly hasn't been
>> used by many Egit/Jgit users. Can anyone confirm if it is supported by
>> Egit/Jgit (and I'm barking up the wrong tree).
> 
> I am pretty certain we forgot to support gitfile in JGit. Hence this
> doesn't work in EGit.
> 
> Whoops.

This[1] little snippet makes me think it wasn't entirely forgotten but perhaps not finished or widely tested.

Alternatively as a workaround is there anyway of telling git to use old the behaviour for git submodule init?

-- [1] - http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/lib/BaseRepositoryBuilder.java#n93

Previous: Shawn PearceNext: Robin Rosenberg
Message 3 of 4 in “Egit/Jgit support for relocated .git directories”
  1. Chris PackhamJun 26, 2012
  2. Shawn PearceJun 26, 2012
  3. Chris PackhamJun 28, 2012
  4. Robin RosenbergJul 7, 2012

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.