Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp671327pxj; Wed, 2 Jun 2021 08:33:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkdf32z7XN4tekegUnd0L8NsARoNQMfqhWh2jyA2gv7JLxdZPqB89UmM7CksQrN+7H5Dd9 X-Received: by 2002:a17:906:e2d6:: with SMTP id gr22mr7712474ejb.514.1622648029292; Wed, 02 Jun 2021 08:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622648029; cv=none; d=google.com; s=arc-20160816; b=QMY9qO/89m1UpmTt6CCS+OJ3Wt7wdsRYohfyqQ2a03vym7XwACgwps2goRyOUnt3ak elLf+gfnLCcPLGlxUn/AHZxd8yO1nmkocvSNxGx9GrZJ8KiyRO8DRIMYwEe9SEDzX88f J1clnQKjA/IW+3TocNYzFI2sBpOdqzhL1GMfnz4WUOSsbVjlKa3mk6d70S/WeKnLCBAR SnWonUkb4HRpfgePPYEmh0Wm19pOyODZppNSA9v7nVM25v2jFwhx8q05WbCIOYvsrUWm F4YjQTGnCbzYd9sue71qUdn8Yc5jpyC43VijYmiHo/eYXnO/LPJuDG0QG6PZqEqx7+Aj /kAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZX81G7CDTBG37uDvVpvZEGFV4V5kWW78w3POK15Svl4=; b=oC3yMX66G08f2JQRgfwKtCJISv/BPf7kw/YJK6Xwuxw+ZmkmE/PnhJPmM90AhqAkb0 5nf8uNIosFslr1FAy2EpZoLPbyqRgOTiMgrpRKQFfD28ws1R1Qe7ea2IZrFwZBKfH8Wo 62UmjbXy2zQvCUsJ3D7H3DJo5MaRsGJ5iEILC7Qcce3AFcwYVdtlNZeYn+klSPW1LOis yZhC3zSHHgz9eVXsnWDAwGL8DqxxXf7k0ad0OfFzzNUwWc3h5/sUxPe+chUL1RkabMMn uzJjjtObokoK8GSDCu/UzZA7AnTdWPr+VtfpKSbYB2d6icwN969e2Ky/Y7PFdXjlqIff fwNg== 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 qw11si64432ejb.688.2021.06.02.08.33.25; Wed, 02 Jun 2021 08:33:49 -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 S231751AbhFBPbe (ORCPT + 99 others); Wed, 2 Jun 2021 11:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbhFBPbc (ORCPT ); Wed, 2 Jun 2021 11:31:32 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9DEFC061574; Wed, 2 Jun 2021 08:29:47 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1loSoS-003q0F-9L; Wed, 02 Jun 2021 15:29:44 +0000 Date: Wed, 2 Jun 2021 15:29:44 +0000 From: Al Viro To: Mathieu Desnoyers Cc: git@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , linux-kernel , Jiri Kosina , Greg Kroah-Hartman 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=us-ascii Content-Disposition: inline In-Reply-To: <30399052.5964.1622647235870.JavaMail.zimbra@efficios.com> Sender: Al Viro 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: > Hi, > > Following a discussion with Peter Zijlstra about whether code cleanup > and functional changes done to the Linux kernel scheduler belong to separate > patches or should be folded together, the argument for folding cleanup > and function changes came to be mainly motivated by the current behavior > of git blame: code cleanup patches end up burying the important changes so > it becomes cumbersome to find them using git blame. > > 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. > > Tagging patches as trivial and cleanup should be done in the patch commit message > (possibly in the title), and enforcing proper tagging of commits is already the > responsibility of the maintainer merging those cleanup/trivial commits into the > Linux kernel anyway. > > Under the hood, I suspect it could use something similar to git log --grep= > --invert-grep. > > This should allow git blame users to easily filter out the noise and focus on the relevant > functional changes. > > Any maybe the patterns associated to "cleanup" and "trivial" commits should be something > that can be configured through a git config file. > > Thoughts ? Just an observation: quite a few subtle bugs arise from mistakes in what should've been a trivial cleanup. Hell, I've seen bugs coming from rebase of provably no-op patches - with commit message unchanged. So IME this is counterproductive...