git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Zero King" <l2dy@macports.org>
Subject: Re: [PATCH 6.5?/8] version: move --build-options to a test helper
Date: Wed, 31 May 2017 17:27:21 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1.1705311726110.3610@virtualbox> (raw)
In-Reply-To: <20170530210530.o5gbz2k24wxrfner@sigill.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]

Hi,

On Tue, 30 May 2017, Jeff King wrote:

> On Tue, May 30, 2017 at 08:45:53PM +0000, Ævar Arnfjörð Bjarmason wrote:
> 
> > On Tue, May 30, 2017 at 7:17 AM, Jeff King <peff@peff.net> wrote:
> > > The "git version" command didn't traditionally accept any
> > > options, and in fact ignores any you give it. When we added
> > > simple option parsing for "--build-options" in 6b9c38e14, we
> > > didn't improve this; we just loop over the arguments and
> > > pick out the one we recognize.
> > >
> > > Instead, let's move to a real parsing loop, complain about
> > > nonsense options, and recognize conventions like "-h".
> > >
> > > Signed-off-by: Jeff King <peff@peff.net>
> > > ---
> > > I assume nobody was running "git version --foobar" and expecting it to
> > > work. I guess we could also complain about "git version foobar" (no
> > > dashes), but this patch doesn't. Mainly I wanted the auto-generated
> > > options list.
> > 
> > Looks good to me. I started hacking this up the other day, but then
> > thought "wait a minute, isn't this just a test helper?" and wrote this
> > which I've rebased on top of your change.
> > 
> > I may be missing something here but isn't this a much straightforward
> > way to accomplish this, or is this used by some external program
> > outside of git.git that's going to rely on --build-options output?
> 
> My intent in putting it into the actual git binary was that it could
> also be useful for collecting build-time knobs from users (who may be
> using a binary package). Like:
> 
>   http://public-inbox.org/git/20160712035719.GA30281@sigill.intra.peff.net/
> 
> We haven't filled in that NEEDSWORK yet, but I'd rather see us go in
> that direction than remove the option entirely.

FWIW it also helped Git for Windows.

The two additional bits we added to the build options (the commit from
which Git was built and the architecture) did not hurt one bit, either.

In other words, it would make my life a lot harder if --build-options were
moved to a test helper that does not ship with the end product.

Ciao,
Dscho

  reply	other threads:[~2017-05-31 15:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-29 11:45 [Bug] setup_git_env called without repository Zero King
2017-05-29 13:01 ` Ævar Arnfjörð Bjarmason
2017-05-29 15:32   ` Jeff King
2017-05-30  5:09     ` [PATCH 0/8] consistent "-h" handling in builtins Jeff King
2017-05-30  5:11       ` [PATCH 1/8] am: handle "-h" argument earlier Jeff King
2017-05-30  5:43         ` Junio C Hamano
2017-05-30  5:12       ` [PATCH 2/8] credential: handle invalid arguments earlier Jeff King
2017-05-30  5:13       ` [PATCH 3/8] upload-archive: handle "-h" option early Jeff King
2017-05-30  5:15       ` [PATCH 4/8] remote-{ext,fd}: print usage message on invalid arguments Jeff King
2017-05-30  5:16       ` [PATCH 5/8] submodule--helper: show usage for "-h" Jeff King
2017-05-30  5:17       ` [PATCH 6/8] version: convert to parse-options Jeff King
2017-05-30 20:45         ` [PATCH 6.5?/8] version: move --build-options to a test helper Ævar Arnfjörð Bjarmason
2017-05-30 21:05           ` Jeff King
2017-05-31 15:27             ` Johannes Schindelin [this message]
2017-05-31 15:31               ` Jeff King
2017-05-31 15:46                 ` Johannes Schindelin
2017-05-31 17:51                   ` Ævar Arnfjörð Bjarmason
2017-05-31 21:06                     ` Jeff King
2017-05-30  5:18       ` [PATCH 7/8] git: add hidden --list-builtins option Jeff King
2017-05-30  5:19       ` [PATCH 8/8] t0012: test "-h" with builtins Jeff King
2017-05-30  6:03         ` Junio C Hamano
2017-05-30  6:05           ` Jeff King
2017-05-30  6:08             ` Junio C Hamano
2017-05-30  6:15               ` Jeff King
2017-05-30 13:23                 ` Junio C Hamano
2017-05-30 15:27                   ` Jeff King
2017-05-30 15:44                     ` Jeff King
2017-05-30 22:39                       ` Junio C Hamano
2017-06-01  4:17                     ` Junio C Hamano
2017-06-01  5:35                       ` Jeff King
2017-06-01  5:42                       ` Junio C Hamano
2017-06-01  5:54                         ` Junio C Hamano
2017-06-01  6:25                           ` Jeff King
2017-06-01  7:51                             ` Junio C Hamano
2017-06-01  6:10                         ` Jeff King
2017-06-13 23:08         ` Jonathan Nieder
2017-06-14 10:03           ` Jeff King
2017-05-30  5:52       ` [PATCH 0/8] consistent "-h" handling in builtins Junio C Hamano

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=alpine.DEB.2.21.1.1705311726110.3610@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=l2dy@macports.org \
    --cc=peff@peff.net \
    /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).