From patchwork Mon Dec 11 22:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonardo Bras Soares Passos X-Patchwork-Id: 176945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7369093vqy; Mon, 11 Dec 2023 14:14:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeXchf9rIrB8ROj0lUIgnaj1ufvT3ZFUwMr0J4bAfhTqC5BmuPjgY5Zwp4nPIb6Vucq2YR X-Received: by 2002:a17:902:704c:b0:1d0:ab0e:9157 with SMTP id h12-20020a170902704c00b001d0ab0e9157mr2669212plt.128.1702332851549; Mon, 11 Dec 2023 14:14:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702332851; cv=none; d=google.com; s=arc-20160816; b=ufT/p/574ckM41UHghZ5LMOG2elQIQJhj9InmN1nrytpBP0hvyBq3UXJYDJ3OCDpSb /xPJUjUOg8IcQmfHQQW9hYgpl7mwlxsA0t+uGGclPdtdeZuibRAQpOTrxj552HsfIJ2x 73PIjNR0jaf2v8+MwX5qejjL0sL09Fp7fmxg2h171Pi/n8O2mAPSLlPgcivMs5SnTQGh YthRd1YW8FDO13syM0zwPYnADAg8g4TuokSvtw1JvZVjjYeWi3z7hymtWNBzOoRvySkr E3vsrXBIegWuBtI9tkNIbLDxm102vdL+vLJX6ZIJuFR73l3TG82Tv1KDH2mTrWIjW1Tm g9iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iPVf4tIFm+3r3HHF66qfweGUV+NYW/dRVWEv9IV2zdY=; fh=2k1ozkxHDUeb2eH7mrE7Ugli2zFPbuhQLLZ7cpa7cGQ=; b=sjDvS37p73VWeNMJ62fCkC+p78GYRt9CCB0drgyevzZ7gygCOF+vCe+4g1LRE+j85T fYpP5mvYYDFxF3npdHfYu8oKj6zDW+q6NZC6wQfI0mfwfoygju9Gsn0QoEJGEZH2Lli7 QwC0gy+VltYoDCGZ+TXWwd5tnn4KbHhfG1wfa4Gab1IvJNLc37cz+S5n0vBGNs5lbT3U EH1UTJ40RGxduXG7WQIf/sQlfBXwy9aBGVsYegIIp4ljtycKTB34WcQF6jlREbMk1f8V fHtxL2yPusJD5p5V5IYS7yLFgPSIbainNqpaVi6disXiziS5ofJLKOuE8YFHPOPbDlJa bQPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UyTDZAOg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id y16-20020a17090322d000b001d0753c86c0si6857313plg.60.2023.12.11.14.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 14:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UyTDZAOg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 02CCF8053602; Mon, 11 Dec 2023 14:14:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344944AbjLKWN6 (ORCPT + 99 others); Mon, 11 Dec 2023 17:13:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjLKWN5 (ORCPT ); Mon, 11 Dec 2023 17:13:57 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17608A6 for ; Mon, 11 Dec 2023 14:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702332843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iPVf4tIFm+3r3HHF66qfweGUV+NYW/dRVWEv9IV2zdY=; b=UyTDZAOgblmjK31BeSb1Dgx2c+OFjry8MdHFustruASYiD3GjQ6fCtruwnoAZh9ECX40Jj 2oJc6VvQxzz8S2GQBrmgwztz1m+XQvG9xjWnvBdQXhN4hFFkQr3aRZ2oYfFVT0vufa8Za3 HJ6ROClTjjmg2DOLi2TbwV58PSYmC3k= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-5yHqR-O5PKi37l8VqP5_Qg-1; Mon, 11 Dec 2023 17:14:01 -0500 X-MC-Unique: 5yHqR-O5PKi37l8VqP5_Qg-1 Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-1d1e42e807cso32412445ad.3 for ; Mon, 11 Dec 2023 14:14:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702332841; x=1702937641; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iPVf4tIFm+3r3HHF66qfweGUV+NYW/dRVWEv9IV2zdY=; b=jr3d5d56d0T7bA5Tgf5iEm4st/MvvfNFaWed7CNVUM6PgRMob2gXMRcE2ykPxVjc17 kZA8CF/31Wp8znT7H0GvIPvDOS3fdxyQf2oAkkQHrYUKWOOrr0YGuPukCvC1JXb++mDz r5FCk+71Qzkkwto+GyiaYWX3Cz015/n+8Al6Hch1BqErhhKuIN/CMFxq8zWp8p7KRGyi MQQwXwMUeHJiiKkRSNas09/yYImmhLQE2IG6rc0/wqAszBOvmiSR8c10JCP0LYpjYMSm 2P1EdaXgtKF/KxwkiKev6LfyibH47ItNU3pBcCu8xbZYpsktymsst7NBJ1AsgfwZ0r9U xolA== X-Gm-Message-State: AOJu0YwEqNILFLU6ehvPrghMSIUa227Juwclct+2SljP/P4NfoOA7c7K nTJbi3MZpKqtOcCzRVe6KDqL3TubdEmfcx9fSCcuTVLSiUzs2MV4DfoyuaKO3BALheTfmRWRNq+ OE4hb4J33uGea9CvMN2UQC7h0 X-Received: by 2002:a17:902:e5ce:b0:1d3:2a94:cb46 with SMTP id u14-20020a170902e5ce00b001d32a94cb46mr1288783plf.31.1702332840675; Mon, 11 Dec 2023 14:14:00 -0800 (PST) X-Received: by 2002:a17:902:e5ce:b0:1d3:2a94:cb46 with SMTP id u14-20020a170902e5ce00b001d32a94cb46mr1288768plf.31.1702332840343; Mon, 11 Dec 2023 14:14:00 -0800 (PST) Received: from localhost.localdomain ([2804:1b3:a802:3102:945e:6f76:fb73:6512]) by smtp.gmail.com with ESMTPSA id h4-20020a170902f54400b001cf85115f3asm7161187plf.235.2023.12.11.14.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 14:13:59 -0800 (PST) From: Leonardo Bras To: Masahiro Yamada , Leonardo Bras , Randy Dunlap , Nicolas Schier , Nathan Chancellor , Nick Desaulniers , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [RFC PATCH v6 1/1] scripts: Introduce a default git.orderFile Date: Mon, 11 Dec 2023 19:13:36 -0300 Message-ID: <20231211221338.127407-1-leobras@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 11 Dec 2023 14:14:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785025371889741457 X-GMAIL-MSGID: 1785025371889741457 When reviewing patches, it looks much nicer to have some changes shown before others, which allow better understanding of the patch before the the .c files reviewing. Introduce a default git.orderFile, in order to help developers getting the best ordering easier. Signed-off-by: Leonardo Bras Acked-by: Randy Dunlap --- Changes since RFCv5: - Replace "*Kconfig*" by "Kconfig*" + "*/Kconfig*" to avoid matching files like foo-Kconfig, which should not be valid here. - Same of above for "*Kbuild*" and "*Makefile*" - Thanks Masahiro Yamada for this suggestion! Changes since RFCv4: - Added scripts/* into "build system" section - Added "git-specific" section with this script and .gitignore - Thanks for this feedback Nicolas! Changes since RFCv3: - Added "*types.h" matching so type headers appear before regular headers - Removed line ends ($) in patterns: they previously provided a false-positive - Fixed build patterns to allow matching Kconfig, Kbuild & Makefile in any subdirectory Changes since RFCv2: - Fixed licence comment to from /**/ to # - Fixed filename in how-to comment - Fix build order: Kconfig -> Kbuild -> Makefile - Add *.mk extension - Add line-ends ($) to make sure and get the correct extensions - Thanks Masahiro Yamada for above suggestions! - 1 Ack, thanks Randy! Changes since RFCv1: - Added Kconfig* (thanks Randy Dunlap!) - Changed Kbuild to Kbuild* (improve matching) scripts/git.orderFile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 scripts/git.orderFile diff --git a/scripts/git.orderFile b/scripts/git.orderFile new file mode 100644 index 0000000000000..5102ba73357f0 --- /dev/null +++ b/scripts/git.orderFile @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0 + +# order file for git, to produce patches which are easier to review +# by diffing the important stuff like header changes first. +# +# one-off usage: +# git diff -O scripts/git.orderFile ... +# +# add to git config: +# git config diff.orderFile scripts/git.orderFile +# + +MAINTAINERS + +# Documentation +Documentation/* +*.rst + +# git-specific +.gitignore +scripts/git.orderFile + +# build system +Kconfig* +*/Kconfig* +Kbuild* +*/Kbuild* +Makefile* +*/Makefile* +*.mak +*.mk +scripts/* + +# semantic patches +*.cocci + +# headers +*types.h +*.h + +# code +*.c