git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Phil Hord <phil.hord@gmail.com>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git List <git@vger.kernel.org>
Subject: Re: Composing git repositories
Date: Mon, 01 Apr 2013 14:14:47 +0200	[thread overview]
Message-ID: <51597A37.1010301@web.de> (raw)
In-Reply-To: <CABURp0q9mV+-tEtHGpE4mh9cdbhkA8fr4i7XpBtK0fpfSYg-+A@mail.gmail.com>

Am 01.04.2013 01:50, schrieb Phil Hord:
> On Sun, Mar 31, 2013 at 4:34 PM, Ramkumar Ramachandra
> <artagnon@gmail.com> wrote:
>> Jens Lehmann wrote:
>>> Guess what: submodules are the solution for a certain set of use
>>> cases, and tools like subtree are a solution for another set of
>>> use cases. There is no silver bullet.
>>
>> That's the core of your argument: submodules already solve what it
>> was meant to, and we can't get it to solve a larger class of problems.
>>  In other words, you're implying that it's impossible to build a tool
>> that will be able to compose git repositories in a way that solves a
>> very large class of problems.  I don't see conclusive proof for this,
>> so I have to disagree.
> 
> I think it is possible to solve larger classes of problems with
> submodules, but it is a harder problem than you seem to think.  In any
> case I do not think you need to re-engineer submodules to improve
> them.
> 
> Sumodules are good for preserving history.  When properly managed,
> they answer the question git always answers, "Where was my code in the
> past?"  I would like proper management to be easier, but I understand
> why it is difficult; and I see it getting easier.

Exactly.

> Some users also want submodules to handle other tasks, like "Import
> branch-tracked upstream changes (i.e. git pull origin master)."  This
> too is useful, but it is a different problem than submodules'
> primarily try to solve.  But they do already solve _part_ of that
> problem ("Show me how these modules are related"), so it seems a
> trivial thing to ask them also to handle the "floating branch" task.
> The trick is to handle this task in a way that does not break the task
> they are designed and used for already.

But I think we recently learned to support that use case with
submodules. I think there are two floating models:

- Tracked:
  Follow a branch in the submodule and let git help you to advance
  the submodule to the tip of that branch at certain times, but
  still record a certain SHA-1 in the superproject to maintain
  reproducibility. We support this since 1.8.2 (see 06b1abb5 by
  Trevor).

- Untracked:
  Some people just want "the newest" tip of a branch checked out in
  the submodule and update that from time to time (I suspect this
  is because they are used to SVN externals, which I believe work
  that way). You throw away reproducibility, which I think is not
  good and not the way I expect Git to work. But that use case is
  achieved with a simple script and some config settings telling
  Git to don't even look for changes in the submodule anymore, and
  submodule infrastructure will set up everything for you after
  cloning the superproject. You run your custom script from time
  to time and have a truly floating submodule.

So to me it looks we support both floating models with current Git's
submodule infrastructure.

> Some other users want submodules to solve the problem of composition,
> like "Show me the combined log of all these submodules."  (Replace
> "show log" with "diff", "merge", "bisect" or even "rebase" if you
> like.)  I think this is where Jens is leaning when working to improve
> the user experience.  But this direction does not require
> re-architecting the fundamentals of submodules.

Correct. The only major change needed for that was to move the .git
directories into the .git directory of the superproject to prepare
for recursive update. But that is done under the hood and didn't
touch the fundamentals of using gitlinks and .gitmodules, it is just
a change in the layout of the local clone.

  reply	other threads:[~2013-04-01 12:15 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26  7:56 Composing git repositories Ramkumar Ramachandra
2013-03-26 16:39 ` Junio C Hamano
2013-03-27 11:49   ` Ramkumar Ramachandra
2013-03-27 16:06     ` Junio C Hamano
2013-03-27 17:02       ` Ramkumar Ramachandra
2013-03-27 17:16         ` Junio C Hamano
2013-03-27 19:26         ` Jonathan Nieder
2013-03-27 20:18           ` Junio C Hamano
2013-03-27 20:42             ` Jonathan Nieder
2013-03-28 11:48             ` Ramkumar Ramachandra
2013-03-28 20:25               ` Jens Lehmann
2013-03-28 10:01           ` Ramkumar Ramachandra
2013-03-28 18:21             ` Jonathan Nieder
2013-03-28 20:17             ` Jens Lehmann
2013-03-27 23:02         ` Jens Lehmann
2013-03-28  9:16           ` Ramkumar Ramachandra
2013-03-28 20:40             ` Jens Lehmann
2013-03-31 20:34               ` Ramkumar Ramachandra
2013-03-31 22:57                 ` Jonathan Nieder
2013-04-02 17:44                   ` Ramkumar Ramachandra
2013-04-02 17:58                     ` Jeff King
2013-04-02 19:33                       ` Ramkumar Ramachandra
2013-04-02 19:56                     ` Jens Lehmann
2013-04-02 18:03                   ` Junio C Hamano
2013-04-04  6:40                     ` Junio C Hamano
2013-04-05  2:36                       ` Duy Nguyen
2013-04-05  4:53                         ` Junio C Hamano
2013-04-05  5:27                           ` Duy Nguyen
2013-04-05  7:15                             ` Jens Lehmann
2013-03-31 23:50                 ` Phil Hord
2013-04-01 12:14                   ` Jens Lehmann [this message]
2013-04-01 14:49                     ` Phil Hord
2013-04-02 18:35                     ` Ramkumar Ramachandra
2013-04-02 18:54                       ` Jonathan Nieder
2013-04-02 19:09                         ` Junio C Hamano
2013-04-02 19:11                         ` Ramkumar Ramachandra
2013-04-02 19:20                           ` Jonathan Nieder
2013-04-02 19:29                             ` Ramkumar Ramachandra
2013-04-02 19:49                               ` Ramkumar Ramachandra
2013-04-02 19:59                       ` Jens Lehmann
2013-04-01  9:50                 ` Jens Lehmann
2013-04-01  0:16 ` Seth Robertson
2013-04-02 19:19   ` Ramkumar Ramachandra

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=51597A37.1010301@web.de \
    --to=jens.lehmann@web.de \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phil.hord@gmail.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.
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).