git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Brandon Williams <bmwill@google.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/4] submodule.c: uninitialized submodules are ignored in recursive commands
Date: Thu, 13 Apr 2017 12:12:08 -0700	[thread overview]
Message-ID: <CAGZ79kZybFNPPAuw4GmVUSmQVBcCG402uCur8M9hSoY3CbhbXw@mail.gmail.com> (raw)
In-Reply-To: <20170413190541.GD96917@google.com>

On Thu, Apr 13, 2017 at 12:05 PM, Brandon Williams <bmwill@google.com> wrote:
> On 04/11, Stefan Beller wrote:
>> This was an oversight when working on the working tree modifying commands
>> recursing into submodules.
>>
>> To test for uninitialized submodules, introduce another submodule, that is
>> uninitialized in the actual tests. By adding it to the branch "add_sub1",
>> which is the starting point of all other branches, we have wide coverage.
>>

...

>
> The 'submodule add' command will make the submodule active, so you'll
> need to add in a line to subsequently make the submodule inactive for
> this to work, unless you do in at a later point in time.

Yes, it will make it active, but that doesn't matter here, because at this
point (in create_lib_submodule_repo) we prepare an upstream
in submodule_update_repo

Any later test follows the structure of

    prolog &&
    reset_work_tree_to no_submodule &&
    (
        cd submodule_update &&
        # do actual test here, in submodule_update
    )

Note that 'prolog' performs a clone of submodule_update_repo
to submodule_update, manually setting 'sub1' to active.

'uninitialized_sub' is not active.

I tried to explain it via
    To test for uninitialized submodules, introduce another submodule,
    that is uninitialized in the actual tests.
in the commit message, but that is too concise apparently.
So the resend will explain that a bit more.

Thanks,
Stefan

  reply	other threads:[~2017-04-13 19:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 23:49 [PATCH 0/4] recursive submodules: git-reset! Stefan Beller
2017-04-11 23:49 ` [PATCH 1/4] entry.c: submodule recursing: respect force flag correctly Stefan Beller
2017-04-12 11:28   ` Philip Oakley
2017-04-14 18:28   ` Jonathan Tan
2017-04-14 20:12     ` Stefan Beller
2017-04-11 23:49 ` [PATCH 2/4] submodule.c: uninitialized submodules are ignored in recursive commands Stefan Beller
2017-04-13 19:05   ` Brandon Williams
2017-04-13 19:12     ` Stefan Beller [this message]
2017-04-13 19:14       ` Brandon Williams
2017-04-11 23:49 ` [PATCH 3/4] submodule.c: harden submodule_move_head against broken submodules Stefan Beller
2017-04-12 11:32   ` Philip Oakley
2017-04-13 19:08   ` Brandon Williams
2017-04-13 19:17     ` Stefan Beller
2017-04-14 20:13   ` Jonathan Tan
2017-04-11 23:49 ` [PATCH 4/4] builtin/reset: add --recurse-submodules switch Stefan Beller

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=CAGZ79kZybFNPPAuw4GmVUSmQVBcCG402uCur8M9hSoY3CbhbXw@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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).