From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 82E6D1F4B4 for ; Sat, 16 Jan 2021 04:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726018AbhAPEuO (ORCPT ); Fri, 15 Jan 2021 23:50:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbhAPEuO (ORCPT ); Fri, 15 Jan 2021 23:50:14 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECDC5C0613D3 for ; Fri, 15 Jan 2021 20:49:33 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id d8so10738541otq.6 for ; Fri, 15 Jan 2021 20:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cTvTeHfCcIFD2CLPgYc/fMmHPkyZqW8JfJSfZi7O7wQ=; b=hFuOcxM7smfM4rRI9ZQ9zm5uWj9VzZXbD2d4zZNElQub69bSkqstqfySnvPJYmf2yf 26hX+Lz3LfkZyo4yNdVPR24uh9HaluJr2ftxRlJYs0CGIcRmYfcp7KVQbFqQaxYb5dhT TtsHQIzOFoTZ6HPcStl72Q4nPKdytMlQok4pDLtjlC4EC6pUnGvc4xu4dyjVJBCltSke psyA84B7jAuRzYuk8LEHU2MvJrhFf+F/2fiAdFF3+eXaBCRhBYqH1F77NVXw93ebBAfk 8Iy6a8Xfq8xwV7X5GjqldfA/0/UF6RWR7AL0lYx2kyJDk51EG7luAesnqmHktTiUOmTw IS9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cTvTeHfCcIFD2CLPgYc/fMmHPkyZqW8JfJSfZi7O7wQ=; b=ggWHtQoSMH4sSC890J2RE3tEdxxgeHpqOL4fPs9TlVKV3jFGLT3cHWIn3Eq/6pHARv MOmWv3QN5Mm3bTCQodKPXOkxp+hKjcPXW52MAwoC7moYEN1jKxVPcxJveChygima/ugf w0+afsHoTdf2w3mTUFhOi1oX+3bHd5bxPOaXfD/0XAKIcFxRUMQvvk6EAyvqnGmrd06Q VHsAdSYaMeCWN9+ADKK/vk6DzRDNNywXxVQDSvxwFf3e9ffbAlhUL/+QXiM52U6Y0/yu mQ0mU8fzZh/pKHFo8ZhSzPi/TNizpQTCGFWE8JoW+0t5hOXh1+SglztjuzneL+ta157u G3nA== X-Gm-Message-State: AOAM533jqkKSf1us/l9odpPmuTYs0zo+2IlkREyUlz2IEZ7w2OVz6L38 vUpwv696e13XtQNe/n7ebbFYln0O5lPmo5mtlaI= X-Google-Smtp-Source: ABdhPJwHJfz16fwVQkHjbTtf9iEyBzHK8lHRtuDra0vj5LPa/yJj8xt7G59kEduRoSdLiWW7P5m1FwdZXqKTzLE6eZE= X-Received: by 2002:a9d:313:: with SMTP id 19mr2982063otv.147.1610772573391; Fri, 15 Jan 2021 20:49:33 -0800 (PST) MIME-Version: 1.0 References: <20210108092345.2178-1-charvi077@gmail.com> <20210108092345.2178-2-charvi077@gmail.com> In-Reply-To: From: Charvi Mendiratta Date: Sat, 16 Jan 2021 10:19:21 +0530 Message-ID: Subject: Re: [RFC PATCH 1/9] rebase -i: only write fixup-message when it's needed To: Junio C Hamano Cc: Phillip Wood , Taylor Blau , git , Christian Couder , Phillip Wood , Johannes Schindelin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Junio, On Fri, 15 Jan 2021 at 22:52, Junio C Hamano wrote: > > Charvi Mendiratta writes: > > > Okay, I looked into the write_message(...) and agree that it does not return > > a positive value and only returns non-zero for error case and zero for > > success. So, for this patch maybe we can ignore checking '< 0' here and > > later add another patch to make this function follow the convention of > > "negative is error". > > Please don't. There is a higher cognitive cost to readers when you write > > if (write_message(...)) { > > The reader is forced to look at its implementation to see if it > returns positive in a non-error situation. > > If you write it like so from the beginning > > if (write_message(...) < 0) { > > the reader can trust that the code follows "negative is an error" > convention. One fewer thing readers have to worry about. I agree, earlier I was confused as there were many instances of write_message() without '< 0' in sequencer.c but considering the above I completely agree to follow the convention. Thanks and Regards, Charvi