From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24A2AC433DB for ; Wed, 20 Jan 2021 03:27:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4A7023121 for ; Wed, 20 Jan 2021 03:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728373AbhATD04 (ORCPT ); Tue, 19 Jan 2021 22:26:56 -0500 Received: from mail2.pdinc.us ([67.90.184.28]:39226 "EHLO mail2.pdinc.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728099AbhATD0j (ORCPT ); Tue, 19 Jan 2021 22:26:39 -0500 Received: from [10.42.0.115] (cpe-173-88-170-197.neo.res.rr.com [173.88.170.197]) (authenticated bits=0) by mail2.pdinc.us (8.14.4/8.14.4) with ESMTP id 10K3PmmL022352 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 19 Jan 2021 22:25:49 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 mail2.pdinc.us 10K3PmmL022352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pdinc.us; s=default; t=1611113149; bh=+QlOFOvvNTrBs0Lyf9CSMCXoQ8scWA28mHRRiVzbZ00=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=tcdI8UIzPvXJ1qFtGlOoIEjqVxP1yOWc+9FqlL/bXaAOB3mc5VD8Z7ffqKMtt06NW gsZ5eovJ1h6gBs1dwDcRePp6RImU9GWXFFlzSaMEt53GUrLmFznk9qX9X6ZUBVYz1G UgZlbmybLKaF2ydT1SxI46dxCcQPOVmJ5bb2nrfk2YVutWKIkOOWJpSAch1mWprp3h BPEPS7WSiMO19/XhsgSEV2q8zVTOJ+LpPOvDqS9RGo/hwfWKJuweZRBlwsa/i8V1WJ IExse6FNlyYjV2HdqmOUVNwyYUGN6B+WYvA4GYBVzUNUUDJig+/ANGNaNgLflfKUtJ C9nD55Xm643dg== Subject: Re: [PATCH 1/2] revision: Denote root commits with '#' To: Junio C Hamano Cc: Jason Pyeron , git@vger.kernel.org, Philippe Blain References: <196101d6eab6$20714550$6153cff0$@pdinc.us> <20210117110337.429994-1-kmarek@pdinc.us> <20210117110337.429994-2-kmarek@pdinc.us> <237aeef3-239f-bff4-fa17-5581092c8f51@pdinc.us> From: Kyle Marek Message-ID: <460257a2-478a-eb4c-f6fa-b1cc55384cd5@pdinc.us> Date: Tue, 19 Jan 2021 22:25:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64le; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 1/19/21 5:10 PM, Junio C Hamano wrote: > Kyle Marek writes: > >>> So the condition we saw in your patches, !commit->parents, which >>> attempted to see if it was root, needs to be replaced with a helper >>> function that checks if there is any parent that is shown in the >>> output. >>> ... >>> Hmm? >> Okay, I see what you mean. Fixing --graph to avoid implying ancestry >> sounds like a better approach to me. > Sorry, I do not know how you drew that conclusion from my > description. > > All I meant to convey is "roots are not special at all, commits that > do not have parents in the parts of the history shown are, and care > must be taken to ensure that they do not appear to have parents". Yeah, I guess I am confused. I thought "Fixing --graph to avoid implying ancestry" was reaching the same point as "care must be taken to ensure that [commits without parents shown] do not appear to have parents". (I wasn't just talking about root commits at that point) > And the argument applies equally to either of two approaches. > Whether the solution chosen is > > (1) to use special set of markers "{#}" for commits that do not > have parents in the displayed part of the history instead of > the usual "<*>", or > > (2) to stick to the normal set of markers "<*>" but shift the graph > to avoid false ancestry. > > we shouldn't be special casing "root commits" just because they are > roots. Exactly the same issue exists for non-root commits whose > parents are not shown in the output, if commits from unrelated > ancestry is drawn directly below them. I understand. Coming back to the "root commit" situation below. >> That being said, I spoke to Jason recently, and he expressed interest >> in optionally marking root commits so they are easy to search for in a >> graph with something like /# in `less`. I see value in this, > I do not mind to denote the "this commit may appear directly on top > of another commit, but there is no ancestry" situation with a > special set of markers that is different from the usual "<*>" (for > left, normal and right) set. I agree pagers are good ways to /search > things in the output. > >> So would you be open to my modifying of the patch in question (patch >> 1+2 squashed, I guess) to instead use "--mark-roots=" to >> optionally mark root commits with a string , and pursue fixing >> the --graph rendering issue in another series? > I do not mind if the graph rendering fix does not happen yet again; > IIRC the past contributors couldn't implement it, either. > > I think this new feature should be made opt-in by introducing a new > option (without giving it a configuration variable), with explicit > "--no-