git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] revert: clarify seemingly bogus OPT_END repetition

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 6, 2016, 07:01 UTC
Message-ID
<alpine.DEB.2.20.1607060857240.6426@virtualbox>
In-Reply-To
<CA+P7+xqODaXn2NFY-=Ktr1stzR1mu6_ZO7Lfgj7AEzhzxhLAbw@mail.gmail.com>
Hi Peff & Jacob,
On Tue, 5 Jul 2016, Jacob Keller wrote:
Show 24 quoted lines
> 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

Previous: Jacob KellerNext: Michael J Gruber
Message 5 of 13 in “revert: clarify seemingly bogus OPT_END repetition”
  1. revert: clarify seemingly bogus OPT_END repetitionJohannes Schindelin, Jul 5, 2016
  2. Jeff KingJul 5, 2016
  3. Jeff KingJul 5, 2016
  4. Jacob KellerJul 5, 2016
  5. Johannes SchindelinJul 6, 2016
  6. Michael J GruberJul 6, 2016
  7. Over-/underquoting, was Re: [PATCH] revert: clarify seemingly bogus OPT_END repetitionJohannes Schindelin, Jul 6, 2016
  8. Jacob KellerJul 6, 2016
  9. Michael J GruberJul 9, 2016
  10. Eric WongJul 9, 2016
  11. Johannes SchindelinJul 6, 2016
  12. Johannes SchindelinJul 6, 2016
  13. Jeff KingJul 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.