git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Antoine W. Campagna" <awe@frontmatec.com>
To: Stefan Beller <sbeller@google.com>
Cc: git <git@vger.kernel.org>
Subject: RE: fatal: could not reset submodule index
Date: Mon, 18 Jun 2018 13:57:22 +0000	[thread overview]
Message-ID: <DB6PR0101MB23445AE7C96E5108B544D015D9710@DB6PR0101MB2344.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <CAGZ79kYUyzJK7a+=bQMxi=YJ5LgkS_2eJA1dB325U71ks1jjGg@mail.gmail.com>

> That is true; submodule.recurse is not affecting git clone.
> This was a design decision once it was introduced, as the git clone might be too large. Maybe we need to revisit that decision and just clone the submodules if submodule.recurse is set.
>
> The problem that this bug report highlights, is the following:
> Each branch has its own .gitmodules file and they can be all different, however at clone time we only clone submodules from the currently active branch.
>
> So you could get your test case to pass with
>     git clone --branch with-submodule main clone5
> 

Thank you for your input Stefan.

But here is our situation : 
7 different projects in separate repositories
Big parts of the code is similar between the projects
We want to extract these similar portions in separate repositories and add them as submodules (maybe about 10 of them).
We would do this progressively, adding one submodule at a time.
We need to support older versions so we have to keep branches that will not have submodules.
Since we need to checkout these branches regularly, we would want to have submodule.recurse enabled.
With this setup, every time a submodule is added in one of the projects, each developer would get the "fatal: could not reset submodule index" error and would be unable to checkout master branch.


  reply	other threads:[~2018-06-18 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 18:19 fatal: could not reset submodule index Antoine W. Campagna
2018-06-15 19:47 ` Stefan Beller
2018-06-18 13:57   ` Antoine W. Campagna [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-13 22:17 Antoine W. Campagna

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=DB6PR0101MB23445AE7C96E5108B544D015D9710@DB6PR0101MB2344.eurprd01.prod.exchangelabs.com \
    --to=awe@frontmatec.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@google.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).