Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp837033pxj; Wed, 2 Jun 2021 12:45:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwgSpmwn0ELf3qzgDUlmARPOfbiHlTZ2+ILFmTuU9mXQQKtXvQG2I0BxnFz0AVC7p3OAXl X-Received: by 2002:aa7:d85a:: with SMTP id f26mr6110903eds.332.1622663136321; Wed, 02 Jun 2021 12:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622663136; cv=none; d=google.com; s=arc-20160816; b=e8XNPK7bwPt2XyBy5RhKNHNbXfOZmD/hw3twHKl9DXJWrbrOdfq+UC5m9D6m1iFaTz ji83yL5WsPcNWyA4VQbI4SR4RnTfwPuIAM5FhZKRMmPyjzdAFRDFA2P7wGG6MHngPaoA VEm5xqIKlN/psTHODCF2cpM/NG3mnwMnOtb+qC2IZTx0oSuMuuKx3DblLCbGWG6j+IPW kuySLEXm69udYDMdLLToSBxCce+JLBNd6L/sx561FXklRnb2DHBxY+ukPmINh2skkcDF w52VrbaXaZydx1nH/iBPYiK/4B9c3PW/ksZTqLMeLSMaG30gGu2q/BVa7Eg2vlUuzIit 7JVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=fVrmdQ554fdEV705A9gXMSeU5gDcCQFWvbM/ttq6MZE=; b=G1uG6eDmAT5KEwr6fLSv5moWjPh/VtvD0Pj/SODb6swlZS4wZtDzngBok5sOlVKq4E tLZeawg9TK3Q0GTCZCccyEMFAXt3d6Vl394JQ1b7cL7bjN7V84nd4OTrHOesUqdny9za gw5gLa2QOvezf9MPLg732f+wVYChSw6MdoOT53lMmJl1FfQCnmbik3F+vWSn7IO6nKeF MNBXU4oXfQ5O5hpaxDFu1s+bQ2LHxDG1xYgWuxrEgq1webAFj/0N/jnI9x+5LDrO/PhR b4KXecxQlR0A/HYf2mNFsMAtbJ7h72Ad7lmHvUT0oHxsyz8LuvQWMHrlR4XOxPjZnuOk UVuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si575320ejq.607.2021.06.02.12.45.13; Wed, 02 Jun 2021 12:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbhFBTph (ORCPT + 99 others); Wed, 2 Jun 2021 15:45:37 -0400 Received: from cloud.peff.net ([104.130.231.41]:44350 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbhFBTph (ORCPT ); Wed, 2 Jun 2021 15:45:37 -0400 X-Greylist: delayed 401 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Jun 2021 15:45:37 EDT Received: (qmail 1998 invoked by uid 109); 2 Jun 2021 19:37:11 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 02 Jun 2021 19:37:11 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 20393 invoked by uid 111); 2 Jun 2021 19:37:11 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 02 Jun 2021 15:37:11 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 2 Jun 2021 15:37:10 -0400 From: Jeff King To: Mathieu Desnoyers Cc: git@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , linux-kernel , Jiri Kosina , Greg Kroah-Hartman , Al Viro Subject: Re: git feature request: git blame --ignore-cleanup/--ignore-trivial Message-ID: References: <30399052.5964.1622647235870.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <30399052.5964.1622647235870.JavaMail.zimbra@efficios.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 02, 2021 at 11:20:35AM -0400, Mathieu Desnoyers wrote: > Considering the added value brought by splitting cleanups from functional changes > from a maintainer perspective (easier reverts) and from a reviewer perspective > (easier to focus on the functional changes), I think it would be good to improve > the git tooling to allow easily filtering out the noise from git blame. > > Perhaps a new git blame "--ignore-trivial" and/or "--ignore-cleanup" could solve > this by filtering out "trivial" and "cleanup" patches from the history it considers. There's "-w" to ignore whitespace-only changes. Since Git v2.23.0, there's also "--ignore-rev-file", which lets you ignore arbitrary commits. Since you have to generate a separate list of commits to feed it, it's a little more involved than your "--invert-grep" example. But it's also much more flexible (you can generate the file however you like, and even tweak it by hand). I do tend to agree with Al's notion that commits which are _supposed_ to be trivial sometimes end up not being so. Or another way of thinking about it is: relevance is a property of the query you're making, not the original change. So IMHO the best tool for this kind of thing is the "re-blame from parent" feature that many interactive blame viewers have (I use tig, but I'm sure other tools like magic have a similar feature). There when you land on a boring commit, it's a single key to skip past it and see how the earlier code came about. -Peff