All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Takashi Iwai <tiwai@suse.de>,
	Jeff King <peff@peff.net>, Brandon Williams <bmwill@google.com>,
	Stefan Beller <sbeller@google.com>
Subject: Re: [PATCH v2 4/5] Makefile: use the sha1collisiondetection submodule by default
Date: Sat, 09 Dec 2017 00:30:59 +0100	[thread overview]
Message-ID: <87bmj8er0s.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqo9n86dde.fsf@gitster.mtv.corp.google.com>


On Fri, Dec 08 2017, Junio C. Hamano jotted:

> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Instead the Makefile will emit an error if the contents of the
>> submodule aren't checked out (line-wrapped. GNU make emits this all on
>> one line):
>>
>>     Makefile:1031: *** The sha1collisiondetection submodule is not
>>     checked out. Please make it available, either by cloning with
>>     --recurse-submodules, or by running "git submodule update
>>     --init". If you can't use it for whatever reason you can define
>>     NO_DC_SHA1_SUBMODULE=NoThanks.  Stop.
>
> Sounds OK.
>
> But I actually do not mind to (and may even prefer to) have an
> endgame opposite of what this series tries to lead us to.  We've
> tried to have this as submodule, we've seen that the arrangement
> works, and now we declare victory and get rid of the submodule.

I don't think we can say we tried without having this 4/5 (5/5 not
needed) in a couple of releases. Without this series we always smoothly
fall back to the non-submodule, and only use it if you opt in.

So all we've really tested so far is:

 * CI systems that consume git.git and provide --recurse-submodules to
   git-clone by default.

 * People on this list that have gone out of their way to test by
   manually toggling the the flag.

> That endgame allows us not force people to grab an essential part of
> the codebase as an external dependency from another place, which
> feels quite bad, especially when their primary interest is not in
> dogfooding submodule but in building a working version of Git.

As noted previously my two motivations are:

 1) That we decide what we want to do with this, ultimately I don't
    really mind which way we go.

 2) That if we go with the submodule by default, it should be understood
    that one of the main benefits is us *actually* dogfooding it and
    subsequently improving it for all git users.

> Removing one and keeping the other between the two will make the
> distribution more streamlined by removing the build-time knob we
> need to tweak, but the one that gets removed does not have to be the
> in-tree one that allows people to "git clone" from just one place.

What you're describing here is a great example of #2, and also a way of
making my point above that we really haven't tried submodules in git.git
yet, since you're just worrying about this issue now that using it would
the default.

This is a UX issue with submodules that I agree sucks and there's no
reason for why it couldn't be solved. E.g. one solution is that
submodules could have something like:

    [submodule "sha1collisiondetection"]
            path = sha1collisiondetection
            url = https://github.com/cr-marcstevens/sha1collisiondetection.git
            branch = master
            localbranch = sha1collisiondetection/master

Where the localbranch would be git.git's own copy in a branch of the the
sha1collisiondetection/ commit. Then when you update the ref
sha1collisiondetection/ points to it would also update the
sha1collisiondetection/master branch (and warn/die when you push git.git
master but not that branch).

This would solve offer a solution to this submodule UX issue, but more
importantly I think the likelyhood of such a patch (and others) actually
being written is going to go up *significantly* if the git project
itself is dogfooding the feature, with exhibit A being that you're
already annoyed by it :)

      parent reply	other threads:[~2017-12-08 23:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 21:32 [PATCH 0/4] SHA1DC fixes & fully moving to a git.git submodule Ævar Arnfjörð Bjarmason
2017-11-28 21:32 ` [PATCH 1/4] Makefile: don't error out under DC_SHA1_EXTERNAL if DC_SHA1_SUBMODULE=auto Ævar Arnfjörð Bjarmason
2017-12-05  6:53   ` Jeff King
2017-11-28 21:32 ` [PATCH 2/4] sha1dc_git.h: re-arrange an ifdef chain for a subsequent change Ævar Arnfjörð Bjarmason
2017-12-05  6:55   ` Jeff King
2017-11-28 21:32 ` [PATCH 3/4] Makefile: use the sha1collisiondetection submodule by default Ævar Arnfjörð Bjarmason
2017-12-05  7:02   ` Jeff King
2017-12-05 10:22     ` Ævar Arnfjörð Bjarmason
2017-12-05 13:08       ` Junio C Hamano
2017-12-05 14:16         ` Ævar Arnfjörð Bjarmason
2017-12-09 12:30     ` Kevin Daudt
2017-12-09 12:53       ` Kevin Daudt
2017-12-05 16:32   ` Junio C Hamano
     [not found] ` <20171128213214.12477-5-avarab@gmail.com>
2017-12-05  7:10   ` [PATCH 4/4] sha1dc: remove in favor of using sha1collisiondetection as a submodule Jeff King
2017-12-08 22:29 ` [PATCH v2 0/5] SHA1DC fixes & fully moving to a git.git submodule Ævar Arnfjörð Bjarmason
2017-12-09 13:08   ` Kevin Daudt
2017-12-08 22:29 ` [PATCH v2 1/5] Makefile: don't error out under DC_SHA1_EXTERNAL if DC_SHA1_SUBMODULE=auto Ævar Arnfjörð Bjarmason
2017-12-08 22:29 ` [PATCH v2 2/5] Makefile: under "make dist", include the sha1collisiondetection submodule Ævar Arnfjörð Bjarmason
2017-12-08 22:48   ` Junio C Hamano
2017-12-08 23:15     ` Ævar Arnfjörð Bjarmason
2017-12-19 19:10       ` Junio C Hamano
2017-12-08 22:29 ` [PATCH v2 3/5] sha1dc_git.h: re-arrange an ifdef chain for a subsequent change Ævar Arnfjörð Bjarmason
2017-12-08 22:30 ` [PATCH v2 4/5] Makefile: use the sha1collisiondetection submodule by default Ævar Arnfjörð Bjarmason
2017-12-08 22:53   ` Junio C Hamano
2017-12-08 23:21     ` Junio C Hamano
2017-12-09  0:31       ` Jeff King
2017-12-08 23:30     ` Ævar Arnfjörð Bjarmason [this message]

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=87bmj8er0s.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    --cc=tiwai@suse.de \
    /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.