From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH 1/4] Makefile: don't error out under DC_SHA1_EXTERNAL if DC_SHA1_SUBMODULE=auto
Date: Tue, 5 Dec 2017 01:53:29 -0500 [thread overview]
Message-ID: <20171205065329.GA4788@sigill.intra.peff.net> (raw)
In-Reply-To: <20171128213214.12477-2-avarab@gmail.com>
On Tue, Nov 28, 2017 at 09:32:11PM +0000, Ævar Arnfjörð Bjarmason wrote:
> Fix a logic error in the initial introduction of DC_SHA1_EXTERNAL. If
> git.git has a sha1collisiondetection submodule checked out the logic
> to set DC_SHA1_SUBMODULE=auto would interact badly with the check for
> whether DC_SHA1_SUBMODULE was set.
>
> It would error out, meaning that there's no way to build git with
> DC_SHA1_EXTERNAL=YesPlease without deinit-ing the submodule.
>
> Instead, adjust the logic to only fire if the variable is to something
> else than "auto" which would mean it's a mistake on the part of
> whoever's building git, not just the Makefile tripping over its own
> logic.
This all makes sense, and I agree your patch is an improvement.
One minor whitespace nit:
> diff --git a/Makefile b/Makefile
> index e53750ca01..8fe8278126 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1497,7 +1497,9 @@ else
> LIB_OBJS += sha1dc_git.o
> ifdef DC_SHA1_EXTERNAL
> ifdef DC_SHA1_SUBMODULE
> +ifneq ($(DC_SHA1_SUBMODULE),auto)
> $(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both)
> +endif
> endif
The indentation here is funky. Unfortunately I think $(error) can't be
tab-indented, so it has to either stay at the left-most side, or we have
to use spaces.
But the ifneq/endif pair can be indented. Ordinarily I'd say it's fine
to keep it at the outermost (because of the weird error indent), but
note that we're _inside_ an already-indented ifdef/endif pair. We should
either stay inside there, or we should put the outer one to the left for
consistency.
-Peff
next prev parent reply other threads:[~2017-12-05 6:53 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 [this message]
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
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=20171205065329.GA4788@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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).