git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] difftool: allow running outside Git worktrees with --no-index
Date: Thu, 14 Mar 2019 23:08:12 -0400	[thread overview]
Message-ID: <20190315030811.GA28943@sigill.intra.peff.net> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1903141305550.41@tvgsbejvaqbjf.bet>

On Thu, Mar 14, 2019 at 01:16:45PM +0100, Johannes Schindelin wrote:

> In other words, my take is that the ways in which `--no-index` is used are
> probably not very different from one another, and the bugs lurk in
> really rarely exercised code paths.

Yeah, that's more likely (and consistent with the bugs I remember fixing
in the last few years).

> > We'd just have to remember to add it back to the argv of diff
> > sub-commands we run.
> 
> It was that "add it back" that I was not keen to implement.

Yes, I saw that we pass on the argv we get back from parse_options()
literally to the sub-functions. I was thinking you'd do some trickery
with an argv_array. But I like your approach of using OPT_ARGUMENT()
much better.

> So I was already done with implementing `OPT_ARGUMENT_SEEN()`, based on
> `OPT_ARGUMENT()`, and testing it with my difftool patch, when it occurred
> to me to look what existing users of `OPT_ARGUMENT()` do. Guess what:
> there are none, apart from that test helper used in t0040 to verify that
> `parse_options()` works as intended. And there were none other. In the
> entire commit history.

Heh. That is not the first time I have hit that with the parse-options
code.

I see you posted the new patches, so I'll try to give a careful read in
that part of the thread.

-Peff

  reply	other threads:[~2019-03-15  3:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 19:20 [PATCH 0/2] Allow difftool to be run outside of Git worktrees Johannes Schindelin via GitGitGadget
2019-03-13 19:20 ` [PATCH 2/2] difftool: allow running outside Git worktrees with --no-index Johannes Schindelin via GitGitGadget
2019-03-13 20:46   ` Jeff King
2019-03-14 12:16     ` Johannes Schindelin
2019-03-15  3:08       ` Jeff King [this message]
2019-03-13 19:20 ` [PATCH 1/2] difftool: remove obsolete (and misleading) comment Johannes Schindelin via GitGitGadget
2019-03-14 11:25 ` [PATCH v2 0/3] Allow difftool to be run outside of Git worktrees Johannes Schindelin via GitGitGadget
2019-03-14 11:25   ` [PATCH v2 1/3] difftool: remove obsolete (and misleading) comment Johannes Schindelin via GitGitGadget
2019-03-14 11:25   ` [PATCH v2 3/3] difftool: allow running outside Git worktrees with --no-index Johannes Schindelin via GitGitGadget
2019-03-15  3:17     ` Jeff King
2019-03-15 13:20       ` Johannes Schindelin
2019-03-14 11:25   ` [PATCH v2 2/3] parse-options: make OPT_ARGUMENT() more useful Johannes Schindelin via GitGitGadget
2019-03-15  3:15     ` Jeff King
2019-03-15 13:24       ` Johannes Schindelin
2019-03-18  2:47       ` Junio C Hamano
2019-03-18 21:04         ` Jeff King
2019-03-19  0:25           ` 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

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

  git send-email \
    --in-reply-to=20190315030811.GA28943@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.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).