git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <J.Sixt@eudaptics.com>,
	git@vger.kernel.org, Frank Lichtenheld <frank@lichtenheld.de>,
	skimo@liacs.nl
Subject: Re: [PATCH 5/5] Add gitmodules(5)
Date: Tue, 12 Jun 2007 23:33:13 +0200	[thread overview]
Message-ID: <200706122333.14167.Josef.Weidendorfer@gmx.de> (raw)
In-Reply-To: <7vfy4xhu6p.fsf@assigned-by-dhcp.pobox.com>

On Tuesday 12 June 2007, Junio C Hamano wrote:
> Johannes Sixt <J.Sixt@eudaptics.com> writes:

> > KDE (superproject)
> >  +- kdelibs (subproject)
> >  |   +- admin (subproject)
> >  |   +- subdir1
> >  |   +- ...
> >  +- kdebase (subproject)
> >  |   +- admin (subproject)
> >  |   +- subdir2
> >  |   +- ...
> >  +- kdenetwork (subproject)
> >  |   +- admin (subproject)
> >  |   +- subdir3
> >  |   +- ...
> >  ...
> 
> If these three instances of 'admin' are truly the same project
> created in multiple places in the directory hierarchy, what is
> the reason that it is not arranged like this instead?
> 
>     KDE
>      +- admin
>      +- kdelibs
>      |   +- subdir1
>      |   +- ...
>      +- kdebase
>      |   +- subdir2
>      |   +- ...
>      +- kdenetwork
>      |   +- subdir3
>      |   +- ...
>      ...

Actually, on the SVN server you have this structure.

KDE applications are put together in groups with
other applications of same kind, e.g. kdenetwork contains
applications for net access.

Now if you want to work on one KDE application e.g. in
kdenetwork, you usually checkout _only_ the kdenetwork
directory. There is no need to have other parts; e.g.
you usually should be able to use the KDE libs from
your distribution - no need to checkout kdelibs.

However, the "admin" directory above contains the build
environment, which has to be checked out so that kdenetwork
is able to build. The applications expect the build tools
to reside in the admin subdirectory.

To checkout admin inside KDE modules such as kdenetwork,
SVN externals are used, which is a primitive form of git
submodules, to automatically checkout the admin directory
on checkout of the KDE module.

So the same admin directory only will be duplicated
multiple times only on the developers side where multiple
KDE modules are checked out.

> When kdelibs/subdir1 needs to access stuff in admin, instead of
> going to ../admin, it could very well go to ../../admin couldn't
> it?

Usually, ../../admin will not exist as explicit checkout on
a developers machine. It would be possible to require this, but
it is much nicer to have each checkout of a KDE module
self-contained, including a copy of admin.

> It makes me wonder if the KDE's layout you quoted is a good
> practice we would want to recommend for other people to follow.
> If not, I doubt it is a good idea to model our important concept
> after that layout to begin with.

In the case of KDE, as far as I remember there is no need to
put _everything_ inside of a the mega supermodule. Every KDE
module (like kdelibs, kdebase, kdenetwork) has its own configure
run and checks dependencies.

What IMHO is an important use case for submodules is to have the
same submodule in multiple different superprojects, as the admin
example shows.

Josef

PS: Above admin example is from KDE3. KDE4 uses an
installed build environment (not really sure).

  parent reply	other threads:[~2007-06-12 21:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 19:12 [PATCH 0/5] misc. submodule related changes Lars Hjemli
2007-06-11 19:12 ` [PATCH 1/5] t7400: barf if git-submodule removes or replaces a file Lars Hjemli
2007-06-11 19:12   ` [PATCH 2/5] git-submodule: remember to checkout after clone Lars Hjemli
2007-06-11 19:12     ` [PATCH 3/5] Rename sections from "module" to "submodule" in .gitmodules Lars Hjemli
2007-06-11 19:12       ` [PATCH 4/5] git-submodule: give submodules proper names Lars Hjemli
2007-06-11 19:12         ` [PATCH 5/5] Add gitmodules(5) Lars Hjemli
2007-06-11 22:59           ` Frank Lichtenheld
2007-06-12  7:05             ` Lars Hjemli
2007-06-12  8:04               ` Sven Verdoolaege
2007-06-12  8:27                 ` Lars Hjemli
2007-06-12  9:45                   ` Josef Weidendorfer
2007-06-12 10:23                     ` Lars Hjemli
2007-06-12 12:05                       ` Josef Weidendorfer
2007-06-12  9:49                   ` Sven Verdoolaege
2007-06-12 10:28                     ` Lars Hjemli
2007-06-12 10:34                   ` Johannes Sixt
2007-06-12 10:48                   ` Johannes Sixt
     [not found]                     ` <8c5c35580706120352y24e53a10sf339147b22f1286e@mail.gmail.com>
2007-06-12 10:54                       ` Lars Hjemli
2007-06-12 11:03                       ` Johannes Sixt
2007-06-12 11:12                         ` Lars Hjemli
2007-06-12 12:23                           ` Josef Weidendorfer
2007-06-12 12:37                             ` Lars Hjemli
2007-06-12 12:41                             ` Johannes Sixt
2007-06-12 13:40                               ` Josef Weidendorfer
2007-06-12 13:50                                 ` Josef Weidendorfer
2007-06-12 19:03                     ` Junio C Hamano
2007-06-12 19:10                       ` Sven Verdoolaege
2007-06-12 21:33                       ` Josef Weidendorfer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-11  0:04 Lars Hjemli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706122333.14167.Josef.Weidendorfer@gmx.de \
    --to=josef.weidendorfer@gmx.de \
    --cc=J.Sixt@eudaptics.com \
    --cc=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=skimo@liacs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).