git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Williams <bmwill@google.com>
To: Stefan Beller <sbeller@google.com>
Cc: git@vger.kernel.org, jrnieder@gmail.com, gitster@pobox.com
Subject: Re: [PATCH 3/4] submodule.c: harden submodule_move_head against broken submodules
Date: Thu, 13 Apr 2017 12:08:39 -0700	[thread overview]
Message-ID: <20170413190839.GE96917@google.com> (raw)
In-Reply-To: <20170411234923.1860-4-sbeller@google.com>

On 04/11, Stefan Beller wrote:
> Early on in submodule_move_head just after the check if the submodule is
> initialized, we need to check if the submodule is populated correctly.
> 
> If the submodule is initialized but doesn't look like populated, this
> is a red flag and can indicate multiple sorts of failures:
> (1) The submodule may be recorded at an object name, that is missing.
> (2) The submodule '.git' file link may be broken and it is not pointing
>     at a repository.
> 
> In both cases we want to complain to the user in the non-forced mode,
> and in the forced mode ignoring the old state and just moving the
> submodule into its new state with a fixed '.git' file link.

What about the case where you have marked a submodule as active but
don't have its respective .gitdir yet?  For now i think it would be
acceptable to complain and do nothing/ignore it, in the future we may
want to actually clone and then check it out.

-- 
Brandon Williams

  parent reply	other threads:[~2017-04-13 19:08 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170413190839.GE96917@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --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.
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).