From: Heiko Voigt <hvoigt@hvoigt.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Beller <sbeller@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Jeff King <peff@peff.net>, Jens Lehmann <Jens.Lehmann@web.de>,
Fredrik Gustafsson <iveqy@iveqy.com>,
Leandro Lucarella <leandro.lucarella@sociomantic.com>
Subject: Re: [PATCH v3 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question
Date: Wed, 16 Nov 2016 15:26:49 +0100 [thread overview]
Message-ID: <20161116142649.GA32087@book.hvoigt.net> (raw)
In-Reply-To: <xmqqtwb8s2m8.fsf@gitster.mtv.corp.google.com>
On Tue, Nov 15, 2016 at 04:13:51PM -0800, Junio C Hamano wrote:
> Stefan Beller <sbeller@google.com> writes:
>
> >> "We do not know" ...
> >
> > ... because there is no way to check for us as we don't have the
> > submodule commits.
> >
> > " We do consider it safe as no one in their sane mind would
> > have changed the submodule pointers without having the
> > submodule around. If a user did however change the submodules
> > without having the submodule commits around, this indicates an
> > expert who knows what they were doing."
>
> I didn't think it through myself to arrive at such a conclusion, but
> to me the above sounds like a sensible reasoning [*1*].
I think you have a point here. If I rephrase it like this: "We do
consider it safe as no one in their sane mind *could* have changed the
submodule pointers without having the submodule around..."
Since its actually hard to create such a situation without the submodule
commit around I agree here.
> *1* My version was more like "we do not know if they would get into
> a situation where they do not have enough submodule commits if
> we pushed our superproject, but more importantly, we DO KNOW
> that it would not help an iota if we pushed our submodule to
> them, so there is no point stopping the push of superproject
> saying 'no, no, no, you must push the submodule first'".
Yes saying that would be wrong. I was rather suggesting that we tell the
user that we could not find the submodule commits to and that if he
wants to proceed he should either pass --recurse-submodules=no or
initialize the submodule.
But I think the above reasoning obsoletes my suggestion. I would adjust
the comment accordingly but still keep the patch so we have
documentation that this behavior is on purpose.
Cheers Heiko
next prev parent reply other threads:[~2016-11-16 14:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 14:56 [PATCH v3 0/4] Speedup finding of unpushed submodules Heiko Voigt
2016-11-15 14:56 ` [PATCH v3 1/4] serialize collection of changed submodules Heiko Voigt
2016-11-15 22:15 ` Stefan Beller
2016-11-15 14:56 ` [PATCH v3 2/4] serialize collection of refs that contain submodule changes Heiko Voigt
2016-11-15 22:20 ` Stefan Beller
2016-11-15 14:56 ` [PATCH v3 3/4] batch check whether submodule needs pushing into one call Heiko Voigt
2016-11-15 22:28 ` Stefan Beller
2016-11-16 14:29 ` Heiko Voigt
2016-11-15 14:56 ` [PATCH v3 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question Heiko Voigt
2016-11-15 22:39 ` Stefan Beller
2016-11-16 0:13 ` Junio C Hamano
2016-11-16 14:26 ` Heiko Voigt [this message]
2016-11-15 17:43 ` [PATCH v3 0/4] Speedup finding of unpushed submodules Stefan Beller
2016-11-15 17:52 ` Brandon Williams
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=20161116142649.GA32087@book.hvoigt.net \
--to=hvoigt@hvoigt.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=iveqy@iveqy.com \
--cc=leandro.lucarella@sociomantic.com \
--cc=peff@peff.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.