git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Heiko Voigt <hvoigt@hvoigt.net>
To: Henri GEIST <geist.henri@laposte.net>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] submodule : Add --no-separate-git-dir option to add and update command.
Date: Mon, 10 Mar 2014 21:32:47 +0100	[thread overview]
Message-ID: <20140310203245.GB5345@sandbox-ub> (raw)
In-Reply-To: <1394442486.7891.45.camel@Naugrim>

On Mon, Mar 10, 2014 at 10:08:06AM +0100, Henri GEIST wrote:
> Le samedi 08 mars 2014 à 00:00 +0100, Jens Lehmann a écrit :
> > Am 06.03.2014 23:20, schrieb Henri GEIST:
> > >> What is the use case you are trying to solve and why can that
> > >> not be handled by adding "subsubmodule" inside "submodule"?
> > > 
> > > The problem is access rights.
> > > 
> > > Imagine you have 2 people Pierre and Paul.
> > > Each with different access write on the server.
> > > Pierre has full access on every things.
> > > Paul has full access on superproject and subsubmodule but no read/write
> > > access to submodule only execution on the directory.
> > 
> > Ok, I think I'm slowly beginning to understand your setup.
> > 
> > > I want all user to get every things they are allowed to have with the
> > > command 'git submodule update --init --recursive'.
> > > Then as Paul can not clone submodule he can not get subsubmodule
> > > recursively through it.
> > 
> > Sure, that's how it should work. Paul could only work on a branch
> > where "submodule" is an empty directory containing "subsubmodule",
> > as he doesn't have the rights to clone "submodule".
> 
> I will not redundantly create a branch for each user on the server.
> When users clone the server it already create a special branch for them
> 'master' which track 'origin/master'. And if each user have its own branch
> on the server it will completely defeat the goal of the server "collaboration".
> And transform the git server in simple rsync server.

I do not think that is what Jens was suggesting. It does not matter in
which branch they work, they can directly use master if you like. What
he was suggesting is that they create their repository structure like
this:

git clone git@somewhere.net:superproject.git
cd superproject/submodule
git clone git@somehwere.net:subsubmodule.git
cd subsubmodule
... work, commit, work, commit ...

The same applies for the superproject. Now only someone with access to
the submodule has to update the registered sha1 once the work is pushed
to submodule.

> > > And I need superproject to add also submodule/subsubmodule.
> > 
> > No. Never let the same file/directory be tracked by two git
> > repositories at the same time. Give Paul a branch to work on
> > where "submodule" is just an empty directory, and everything
> > will be fine. Or move "subsubmodule" outside of "submodule"
> > (and let a symbolic link point to the new location if the
> > path cannot be easily changed). Would that work for you?
> 
> If I use symbolic links it will just as gitlink enable to use the
> same subsubmodule clone by more than one superproject but with two
> major problems :
>   - symbolic links do not work under Windows and some of my users do
>     not even know something else could exist.
>   - symbolic links will not store the SHA-1 of the subsubmodule.
>     And a 'git status' in the repository containing the symbolic link
>     will say nothing about subsubmodule state.

Here you are also missing something. What Jens was suggesting was that
you move your subsubmodule directly underneath the superproject and from
the old location you create a link to the new location for a quick
transition. But you can also change all paths in your project to point
to the new location. But in the new location you will have subsubmodule
registered as a submodule only that it is now directly linked (as
submodule) from the superproject instead of the submodule.

> I think where we diverge is in the way we are looking gitlinks.
> Where you see a hierarchic tree, I see a web.
> And I use gitlinks just like multiplatform symbolic links storing
> the SHA-1 of there destination and pointing exclusively on git repositories.

Well but the problem with a web is that it will introduce a lot of
problems that need to be solved. Some repository has to have the
authority about a file (or link). If you have a file in multiple
repositories overlayed how do you know who is in charge and when?

There is a reason why it is designed like this: simplicity. I currently
do not see how your web idea can be simple without introducing a lot of
user interface questions.

Cheers Heiko

  reply	other threads:[~2014-03-10 20:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 14:47 [PATCH] submodule : Add --no-separate-git-dir option to add and update command Henri GEIST
2014-03-03 17:45 ` Jens Lehmann
2014-03-03 20:34   ` Henri GEIST
2014-03-05 18:13     ` Jens Lehmann
2014-03-06  1:25       ` Henri GEIST
2014-03-06 19:48         ` Jens Lehmann
2014-03-06 20:15           ` Henri GEIST
2014-03-06 20:51             ` Jens Lehmann
2014-03-06 22:20               ` Henri GEIST
2014-03-07 23:00                 ` Jens Lehmann
2014-03-10  9:08                   ` Henri GEIST
2014-03-10 20:32                     ` Heiko Voigt [this message]
2014-03-11  9:55                       ` Henri GEIST
2014-03-11 20:11                         ` Heiko Voigt
2014-03-11 22:07                           ` Henri GEIST
2014-03-03 19:22 ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20140310203245.GB5345@sandbox-ub \
    --to=hvoigt@hvoigt.net \
    --cc=Jens.Lehmann@web.de \
    --cc=geist.henri@laposte.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).