git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Jeff King <peff@peff.net>, Git mailing list <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] revert: clarify seemingly bogus OPT_END repetition
Date: Wed, 6 Jul 2016 09:01:30 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1607060857240.6426@virtualbox> (raw)
In-Reply-To: <CA+P7+xqODaXn2NFY-=Ktr1stzR1mu6_ZO7Lfgj7AEzhzxhLAbw@mail.gmail.com>

Hi Peff & Jacob,

On Tue, 5 Jul 2016, Jacob Keller wrote:

> On Tue, Jul 5, 2016 at 1:44 PM, Jeff King <peff@peff.net> wrote:
> > On Tue, Jul 05, 2016 at 04:28:20PM -0400, Jeff King wrote:
> >
> > Something like the patch below.
> >
> > I admit this isn't buggy _now_, so this is potentially just churn. It
> > does make further patches look nicer, though (they don't have to add
> > apparently meaningless OPT_END() slots).
> >
> > -- >8 --
> > Subject: [PATCH] parse_options: allocate a new array when concatenating
> >
> > In exactly one callers (builtin/revert.c), we build up the
> > options list dynamically from multiple arrays. We do so by
> > manually inserting "filler" entries into one array, and then
> > copying the other array into the allocated space.
> >
> > This is tedious and error-prone, as you have to adjust the
> > filler any time the second array is modified (although we do
> > at least check and die() when the counts do not match up).
> >
> > Instead, let's just allocate a new array.
> 
> This seems much preferable to me.

Yes, this is better than my patch.

BTW Jacob, would you terribly mind cutting the quoted parts properly (I
cut 112 lines)? It may not seem like much, but I seem to spend more and
more of my email time budget on skimming unaddressed remainders of quoted
mails, and I would much rather spend that time on something productive.

Thanks,
Johannes

  reply	other threads:[~2016-07-06  7:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 11:58 [PATCH] revert: clarify seemingly bogus OPT_END repetition Johannes Schindelin
2016-07-05 20:28 ` Jeff King
2016-07-05 20:44   ` Jeff King
2016-07-05 21:15     ` Jacob Keller
2016-07-06  7:01       ` Johannes Schindelin [this message]
2016-07-06 11:09         ` Michael J Gruber
2016-07-06 13:16           ` Over-/underquoting, was " Johannes Schindelin
2016-07-06 20:15             ` Jacob Keller
2016-07-09 15:34               ` Michael J Gruber
2016-07-09 23:35                 ` Eric Wong
2016-07-06  7:28     ` Johannes Schindelin
2016-07-06  7:03   ` Johannes Schindelin
2016-07-06 10:48     ` Jeff King

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=alpine.DEB.2.20.1607060857240.6426@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    --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.
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).