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=-4.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MALFORMED_FREEMAIL,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=no 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 7F36F2018E for ; Sun, 7 Aug 2016 08:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751476AbcHGIea (ORCPT ); Sun, 7 Aug 2016 04:34:30 -0400 Received: from mout.gmx.net ([212.227.17.21]:52780 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbcHGIe3 (ORCPT ); Sun, 7 Aug 2016 04:34:29 -0400 Received: from virtualbox ([37.24.141.218]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lusmr-1b5x1t1cgb-0101b0; Sun, 07 Aug 2016 10:34:16 +0200 Date: Sun, 7 Aug 2016 10:34:13 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Junio C Hamano cc: Jeff Hostetler , git@vger.kernel.org, Jeff Hostetler Subject: Re: [PATCH v5 4/9] status: collect per-file data for --porcelain=v2 In-Reply-To: Message-ID: References: <1470434434-64283-1-git-send-email-git@jeffhostetler.com> <1470434434-64283-5-git-send-email-git@jeffhostetler.com> 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:hK94ZY+6+8cIpeyWYIWA3Hxd8OrsdBvoseRxBcrH1oX7vgEn6jU Mia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: X-Mailing-List: git@vger.kernel.org Hi Junio, On Fri, 5 Aug 2016, Junio C Hamano wrote: > Jeff Hostetler writes: > > > if (ce_stage(ce)) { > > d->index_status = DIFF_STATUS_UNMERGED; > > d->stagemask |= (1 << (ce_stage(ce) - 1)); > > + /* > > + * Don't bother setting {mode,oid}_{head,index} since the print > > + * code will output the stage values directly and not use the > > + * values in these fields. > > + */ > > } > > - else > > + else { > > d->index_status = DIFF_STATUS_ADDED; > > + /* Leave {mode,oid}_head zero for adds. */ > > + d->mode_index = ce->ce_mode; > > + hashcpy(d->oid_index.hash, ce->sha1); > > + } > > Not a big deal (no need to resend for this one alone), but let's > make the above properly formatted, i.e. > > if (ce_stage(ce)) { > ... > } else { > ... > } Do I understand correctly that your objections is against having the curly brace before the "else" on its own line? If so, when did our coding style change? I vividly remember that we strongly favored putting the "else" on a new line after a closing brace, to make diffs nicer in case the braces were removed or added. BTW your suggestion has 24 extra spaces after the final closing brace ;-) Ciao, Dscho