* git submodule when submodule is not a clone of a repository
@ 2008-01-18 17:25 Sergio Callegari
2008-01-18 17:46 ` Lars Hjemli
0 siblings, 1 reply; 3+ messages in thread
From: Sergio Callegari @ 2008-01-18 17:25 UTC (permalink / raw)
To: git
Hi,
I am trying to use submodules to keep a project organized.
I am using a workflow that is probably not the common one and I am running into
problems.
Basically, I have a superproject TOP, with subproject A and B. The thing is that
A and B are _not_ cloned from some existing repo. They are two brand new
repositories created with git init.
Basically, I am doing this so that in the superproject I commit states with
specific versions of A and B (that are logically distinct things) that are known
to work fine together. Also I am doing this since A and B are actually just
started with TOP, but I have a provision of making them independently developed
things, so I like to have them separated from start.
The thing is that git-submodule makes very strong assumptions on A and B.
Particularly, if there is no url defined from them some commands (notably
update) will fail.
So I need to make a fake url for the submodule (e.g. .) and a fake origin for it
(again .)
Would it make sense to have a git submodule update not try to fetch if there is
no url defined, but still checkout the right commit for the submodule (rather
than skipping the submodule at all) ?
Sergio
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git submodule when submodule is not a clone of a repository
2008-01-18 17:25 git submodule when submodule is not a clone of a repository Sergio Callegari
@ 2008-01-18 17:46 ` Lars Hjemli
2008-01-18 23:26 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Lars Hjemli @ 2008-01-18 17:46 UTC (permalink / raw)
To: Sergio Callegari; +Cc: git
On Jan 18, 2008 6:25 PM, Sergio Callegari <sergio.callegari@gmail.com> wrote:
> Would it make sense to have a git submodule update not try to fetch if there is
> no url defined, but still checkout the right commit for the submodule (rather
> than skipping the submodule at all) ?
Actually, we could (and probably should) teach git-submodule not to
fetch if the requested SHA1 is already available in the submodule, and
I guess this would solve the problem quite nicely for your usage.
But that will probably not happen before 1.5.4.
--
larsh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git submodule when submodule is not a clone of a repository
2008-01-18 17:46 ` Lars Hjemli
@ 2008-01-18 23:26 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-01-18 23:26 UTC (permalink / raw)
To: Lars Hjemli; +Cc: Sergio Callegari, git
"Lars Hjemli" <hjemli@gmail.com> writes:
> Actually, we could (and probably should) teach git-submodule not to
> fetch if the requested SHA1 is already available in the submodule,..
I think that is a very sensible optimization.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-18 23:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18 17:25 git submodule when submodule is not a clone of a repository Sergio Callegari
2008-01-18 17:46 ` Lars Hjemli
2008-01-18 23:26 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).