Re: git-submodule getting submodules from the parent repository

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Vilain
Date: Saturday, March 29, 2008 - 4:22 pm

Avery Pennarun wrote:

Well, that would create a lot of unnecessary work when cloning.
Partitioning by project is a natural way to divide the projects up.
It's worth noting that the early implementations of submodules were
based on this design, of keeping everything together.

However, what you are suggesting should IMHO be allowed to work.  In
particular, if the submodule path is ".", then I think there's a good
case that they should come from within the same project.  If it's a
relative URL, it should initialize based on the remote URL that was used
for the original fetch (or, rather, the remote URL for the current branch).

And, if it happens that after a checkout, that the commit of a submodule
is already in the object directory (ie, there's another branch), then
maybe that should automatically check out.


It could easily, if someone would allow clone to have a --track option
like git remote does:

  git init
  git remote add -t branch -f URL


This push failure thing is regrettable; however it's not clear which
branch name the submodules should get.  A given commit might exist on
several branches, which one do you choose to name it?


I think this could be a switch to git clone/pull, configurable to be the
default action.


There is also a Google Summer of Code project for this - see
http://git.or.cz/gitwiki/SoC2008Ideas#head-9215572f23513542a23d3555aa72775bc4b91038


Well, no, it's true that the current workflow has interface niggles;
however it's important to understand why the current implementation is
the way it is, and make sure that new designs build on top of the parts
which are already designed well, where they can.

Sam
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: git-submodule getting submodules from the parent repos ..., Sam Vilain, (Sat Mar 29, 4:22 pm)
Re: git-submodule getting submodules from the parent repos ..., Eyvind Bernhardsen, (Sun Mar 30, 6:32 am)
Re: git-submodule getting submodules from the parent repos ..., Eyvind Bernhardsen, (Sun Mar 30, 12:50 pm)
Re: git-submodule getting submodules from the parent repos ..., Eyvind Bernhardsen, (Mon Mar 31, 2:29 am)
Re: git-submodule getting submodules from the parent repos ..., Eyvind Bernhardsen, (Mon Mar 31, 3:05 am)