git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Robert Dailey <rcdailey.lists@gmail.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: subrepo vs submodule
Date: Wed, 19 Jul 2017 10:43:20 -0700	[thread overview]
Message-ID: <CAGZ79kas6jm8+1BhhHqOe4PzFObLVEASXEQfV0H9j=4oLvz7Lw@mail.gmail.com> (raw)
In-Reply-To: <CAHd499BovefnyWjauE0vNaofmvL8JBZCSzJ7w-cJ8Sm3eoJ4=w@mail.gmail.com>

On Wed, Jul 19, 2017 at 7:27 AM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> So I found out about "subrepo" today: https://github.com/ingydotnet/git-subrepo
>
> I'm still reading about how it works internally, but what do you guys
> think about it?

Nice find!

From reading the toplevel ReadMe.pod, I have the impression
that it is closer to subtree than submodules as the content is
stored in the main repository using a .gitrepo file to indicate that
it is a special directory.

> Is it a more or less perfect alternative to submodules?

Maybe to subtrees. It does not offer the workflows that
submodules allow you:
  " Users get your repo and all your subrepos just
  by cloning your repo."

Submodules allow you to *not* get the content of a submodule.
There are multiple reasons for not wanting the content, including
* not needing it (e.g. documentation, hardware specific code
  for an architecture you don't have)
* not wanting it (e.g. large binary files yield bandwidth concerns)

"Upstream history (clone/pull) is condensed into a single commit."

Same for submodules, not so(?) for subtrees.

Depending on the point of view this is either a feature or a bug.
For clean history you may view this as a feature, but as soon as
you want to git-bisect, you'd wish for the most fine grained history
available.

> What would be a reason not to use it?

There are multiple things that should drive a decision. some:
* What do you need in terms of workflow (even just talking about
  "submodule vs subtree" you get different answers for different
  workflows), and then seeing how subrepo compares to the others.
* Can you use it? (does it work on your platform? subrepo is bash,
  whereas submodule, subtree are posix shell; how is it distributed?
  Some people are uneasy installing from random github repos on
  the web, so do you install it via the package manager of your
  distribution, has your organisation a package to use?)
* Ease of use, do you need to explain the workflow
  to collaborateurs?

      reply	other threads:[~2017-07-19 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 14:27 subrepo vs submodule Robert Dailey
2017-07-19 17:43 ` Stefan Beller [this message]

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='CAGZ79kas6jm8+1BhhHqOe4PzFObLVEASXEQfV0H9j=4oLvz7Lw@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=rcdailey.lists@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.
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).