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

Re: [RFC GSoC 2009: git-submodule for multiple, active developers on active trees]

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 1, 2009, 16:10 UTC
Message-ID
<alpine.DEB.1.00.0904011806330.13502@intel-tinevez-2-302>
In-Reply-To
<526944450903311947w2f398c71n95a4a7aa47ecdb7f@mail.gmail.com>
Hi,
On Tue, 31 Mar 2009, P Baker wrote:
Show 18 quoted lines
> >  > *Moving objects from submodule .git directories into the base .git/ 
> >  > directory would protect the submodules and is a good idea.
> >
> > No, I did not say that.
> >
> >  Even worse, I think that moving the .git/ directory into the 
> >  superproject's .git/ would be at least quite a bit awkward in the 
> >  nested case.
> >
> 
> Tthe initial prompt for the proposal was: "Rewrite git-submodule,
> placing the repository for each referenced submodules in the
> superproject's $GIT_DIR/modules...This resolves issues related to
> switching between versions of the superproject..." The prompt, and
> past experience with git, helped me to form my proposal which it seems
> would fix numerous problems with git submodule, with the implied cost
> of some awkwardness/complexity. Am I misunderstanding the prompt? Or
> do you think this could be accomplished more elegantly?

Well, I think the focus here is wrong. The focus should be on the working directory as hinted here:

Show 7 quoted lines
> >  I said that moving submodules' working directory need to protected 
> >  when renaming/deleting submodules.
> 
> I'm sorry, I still don't understand. Where would this occur? What is 
> being protected? What is the submodules' working directory? I'm still 
> learning the intricacies of git, so I'd appreciate any pointers you can 
> give.

If your superproject deletes a submodule, what should happen with the working directory?

And what should happen if the submodule is _moved_? (Which is not as easily detected as with renamed files or directories.)

Show 7 quoted lines
> >  Further, often it would come in rather handy to be able to say 
> >  something like "git diff $REVISION_AS_COMMITTED_IN_THE_SUPERPROJECT" 
> >  from within the submodule...
> >
> 
> That sounds complex, and would break expectations. This would only
> work if git in the submodule working directory knows its a submodule.
... or can detect easily that it is a submodule.
> Is there a way to reference it's super project?
No.
Show 5 quoted lines
> >  Oh, and it would not hurt performance on Windows at all if 
> >  git-submodule would be finally made a builtin.
> 
> You mean rewriting git-submodule.sh in C? What other impacts might that 
> have?
Junio would hate it, I am sure.

Ciao, Dscho

Previous: P BakerNext: Andreas Ericsson
Message 10 of 12 in “[RFC GSoC 2009: git-submodule for multiple, active developers on active trees]”
  1. P BakerMar 25, 2009
  2. Shawn O. PearceMar 30, 2009
  3. P BakerMar 31, 2009
  4. Johannes SchindelinMar 31, 2009
  5. P BakerMar 31, 2009
  6. Johannes SchindelinMar 31, 2009
  7. P BakerMar 31, 2009
  8. Johannes SchindelinApr 1, 2009
  9. P BakerApr 1, 2009
  10. Johannes SchindelinApr 1, 2009
  11. Andreas EricssonApr 1, 2009
  12. Johannes SchindelinApr 1, 2009

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.