From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.7 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 6DFAB20705 for ; Wed, 6 Jul 2016 07:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbcGFHGF (ORCPT ); Wed, 6 Jul 2016 03:06:05 -0400 Received: from mout.gmx.net ([212.227.15.15]:58405 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbcGFHGD (ORCPT ); Wed, 6 Jul 2016 03:06:03 -0400 Received: from virtualbox ([37.24.141.253]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Meg8W-1awZP50POa-00OE6H; Wed, 06 Jul 2016 09:05:27 +0200 Date: Wed, 6 Jul 2016 09:01:30 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Jacob Keller cc: Jeff King , Git mailing list , Junio C Hamano Subject: Re: [PATCH] revert: clarify seemingly bogus OPT_END repetition In-Reply-To: Message-ID: References: <5b424bad41ca027b39eea4b1fa9d87df0a489e0f.1467719888.git.johannes.schindelin@gmx.de> <20160705202820.GA14496@sigill.intra.peff.net> <20160705204447.GB14496@sigill.intra.peff.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:KF86+FyGrzaD057zEVffCMtWEc8lU0QdwsUOJBHuXxqX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bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peff & Jacob, On Tue, 5 Jul 2016, Jacob Keller wrote: > On Tue, Jul 5, 2016 at 1:44 PM, Jeff King 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