git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Lars Schneider <larsxschneider@gmail.com>,
	Stanislav <s.seletskiy@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [RFC] Clone repositories recursive with depth 1
Date: Thu, 12 Nov 2015 15:47:44 -0800	[thread overview]
Message-ID: <CAGZ79kYNCWXVLWAzTCoFfuHGRkJzzUsojGzK9-f=543FVfVMAg@mail.gmail.com> (raw)
In-Reply-To: <19CE7136-E1FD-495A-9BAC-636164757E04@gmail.com>

+cc Stanislav, who came up with the other thread for passing --remote
to git submodule

On Thu, Nov 12, 2015 at 1:39 AM, Lars Schneider
<larsxschneider@gmail.com> wrote:
>> Notice the other email thread, which suggests to include --remote into the
>> call to  git submodule update depending on a branch config option being
>> present in the .gitmodules file.
>
> Can you check "[PATCH v2] add test to demonstrate that shallow recursive clones fail"? This demonstrates the failure that I see. I also tried the "--remote" flag but this does not work either (see test case).
> Can you confirm this behavior?
>
> Cheers,
> Lars

I can confirm it breaks as expected here.

I may have confused you here by pointing to the --remote option.

(git clone is a bit stupid when it comes to submodule handling.)
All it does currently is this:

    if --recurseSubmodules option or --recursive option is given:
        run: "git submodule update --init --recursive"

No attention is paid to any other option such as --depth.
That's all I wanted to point out there.

Ideally we want to add:

    If there is a branch configured in the .gitmodules file,
    we would want to add the --remote command

    if we have given other options such as --depth or --reference
    we want to pass that along to the called submodule helper.

So I was looking at the internal code structure and think one of the next
series I am going to send will touch the code such that we can incorporate
the conditions as outlined above easier, because it is not hardcoded into an
array ["git", "submodule", "update" "--init", "--recursive"], as I
want to add yet
another dynamic option to the submodule helper invocation. (I want to add
--jobs <n> there)

Cheers,
Stefan

  reply	other threads:[~2015-11-12 23:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 14:09 [RFC] Clone repositories recursive with depth 1 Lars Schneider
2015-11-11 19:19 ` Stefan Beller
2015-11-11 20:09   ` Stefan Beller
2015-11-12  9:39     ` Lars Schneider
2015-11-12 23:47       ` Stefan Beller [this message]
2015-11-14 16:25 ` Fredrik Gustafsson

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='CAGZ79kYNCWXVLWAzTCoFfuHGRkJzzUsojGzK9-f=543FVfVMAg@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=s.seletskiy@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).