From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33A372F5337 for ; Sun, 5 Apr 2026 19:16:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775416590; cv=none; b=JrjyszCwdfQEDmuExPQ9ifE/sRZJHbZdqMHmJs0lkX/f5ZxS6rDP5hxnBkh0w96lTuO5u1Sz/1s1ZvMd0qjVdfve2QYqprhRgKAEHjp37sklkpyhl81iPIS3wUU4vol8DRXYzWwTTVvgg9i9YDpmFdCVLxcSI3iNs3mQgwonXww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775416590; c=relaxed/simple; bh=mtlF6RJN9BewfIJXyp/6N5fsoQHQ0aF072l0EVgTG6E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YJG+ucFHm2/ZYuJlfLQg0vK0ZrfGpKgVwJewcvL4nifRG2/Uq42z8pkVWzCxa8GboOfWVOkR8ykovXjw/LvkJOia9bfu/TjyM1q1DjMaQq051Z3sUqKDfg/SpRWfRTcXBa1TPnngowMVp1N5JevdGxfGBNoUYVI7oIYnXJxGLuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=ifFG/GUt; arc=none smtp.client-ip=117.135.210.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="ifFG/GUt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=l3 aQatyjaV/wpg5Wt0B8DaIvuKyy3iRQsqMHE6Y/UpI=; b=ifFG/GUtWI5zgpdi6I SFaf8qnTREfCEo5ExGLnJI0RAGFX38Dh/hUGPKlkJ0SNe0VfkIY+06BGas//dRvU 4GTzDcBJpXh6CP8pwjUxj8twLZOqYDgQu/jbk76pc9hfjzliYyqmxLe3BDHGENOO 76yYdQ6safYpsuRfs0Myjejp4= Received: from localhost.localdomain (unknown []) by gzsmtp3 (Coremail) with SMTP id PigvCgA3WorytNJpOg2CCA--.145S2; Mon, 06 Apr 2026 03:16:06 +0800 (CST) From: CaoRuichuang To: apw@canonical.com, joe@perches.com Cc: dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com, linux-kernel@vger.kernel.org, CaoRuichuang Subject: [PATCH v2 0/2] scripts: support sparse checkouts in checkpatch tools Date: Mon, 6 Apr 2026 03:15:53 +0800 Message-Id: <20260405191555.80315-1-create0818@163.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20260405185504.76040-1-create0818@163.com> References: <20260405185504.76040-1-create0818@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:PigvCgA3WorytNJpOg2CCA--.145S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZF1Uury3CF1kArW8Xw4Utwb_yoWfCFbE9r yIyrWfuFn7CFWUGa9Yyr45WryUKFWDJr18ZF4kAry8Z34DGr4UWF9rCFyxA3W7Z34j9F9Y y390vanYyr9YyjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRt4SoDUUUUU== X-CM-SenderInfo: pfuht3jhqyimi6rwjhhfrp/xtbC6Bd5smnStPe6RgAA3w checkpatch.pl and get_maintainer.pl currently reject sparse checkouts because their top_of_kernel_tree() checks require top-level directories that may not be present in a sparse working tree. This series relaxes that check to match the files the scripts actually need and adds a regression test to keep that behavior from regressing. Changes in v2: - add a regression test for sparse checkout handling in checkpatch.pl and get_maintainer.pl CaoRuichuang (2): scripts: allow checkpatch and get_maintainer in sparse checkouts scripts: add sparse checkout regression test for checkpatch tools scripts/checkpatch-sparse-checkout-test.sh | 48 ++++++++++++++++++++++ scripts/checkpatch.pl | 4 +- scripts/get_maintainer.pl | 9 +--- 3 files changed, 51 insertions(+), 10 deletions(-) create mode 100755 scripts/checkpatch-sparse-checkout-test.sh -- 2.39.5 (Apple Git-154)