From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 70342746E for ; Wed, 14 May 2025 21:10:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747257016; cv=none; b=qgNxs38x5RV0HdJyBKhVDiQWinJLP/35wIdsUqVclez6l6ya07LBOf7cJ7Kgrc1ztbVrFpuqGpIQKfrhgwl5f6q/0Zh4pOpWwgOhTzzVdCtoflLbe4PRuOJPhYInioVpwxAq8Xp5PwZMvGCWLPvOAjizsJCWbKNkeUgtl7LwMIM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747257016; c=relaxed/simple; bh=xiE3iXnCZb+DWiOiPhzK12gkDEPsjhylMHmhvTGDvOQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MzaSvWib7ScuZ9jkXn/KmhAp/o6YlxgluM3+PhScy12q6ipLAPzbDeWcaQ6D8cTSSAqltXDXNtpbt7Sj3PwG/zrIKZyWfp2IdUhD3T1dFR2PSJ9zg3JPisXC4SBHG5AOXw5DtUKqACuVikOVRarvsyPTmZULHnV3gCvhZSyCowU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=WbsJalvX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=owN3HPg6; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="WbsJalvX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="owN3HPg6" Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id 717EE254009D; Wed, 14 May 2025 17:10:12 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-07.internal (MEProxy); Wed, 14 May 2025 17:10:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1747257012; x=1747343412; bh=FYGHRom681 QKlg4AJtiAto8iLhwqChebhKJSkygSIek=; b=WbsJalvXd2Lp/RmE0ArQek/8yn +0Y9F6+tLl8RuHAnAdhWRqZ6WufK9pqmA2ed7gQGnaDD2diCHRQFdHVOcFO3lLvY 5xl6a4hqYO5GKdGSjbGeOj9JR2/htxVirajOZ4iqRKH0dHz9fqBQGSrWT7wsH9l0 AxBGLSTPANkmwN8SC49Y9W+8PDfGWuWqub380psg4+NdcOCGRUa3HXNAONG7i3VL RKXBGCgj8IR9L9iercDJCw7EmAiAlyx6E04QtQ6TOpsOLuYr05TcFYTNlp/5Gvyz b35b/Cxu7do9fTcks1W7ObHwnIwxpZ//ZTV+1zOWmf3sGso3CQoIqpUbOLDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1747257012; x=1747343412; bh=FYGHRom681QKlg4AJtiAto8iLhwqChebhKJ SkygSIek=; b=owN3HPg66WqWkuBntmNVFX7jdjqkqK8uQCxTMfCSxr2zBHMdIiw as+q+D2+LA4v5Yy3UDMAKQKXDATgxApBw4swqhyLN+FgbOpdqj8+8o5R71RW8Tl/ F5aDmWF8zvZAgcIclJVHFxnlwnrXugQ4/m6o/WpSBR6AiZUcM0J0CZuv4uYGJmfy AbSHgnbduVupdfu3CS4AmplzpP2G5SXnlb1ncehrL8t3LW78c7Pyu9Wzu2106Hmu ui8PnH+tD+EMgN372NpksXa+0eASUK6zPCd3rO2+knBbLNGHMRERctstBg9RVkut GyqAHpTkGaCztGi0nyQ5MkmrJn90m3eFLeQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdektdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesthdtredttder tdenucfhrhhomheplfhunhhiohcuvecujfgrmhgrnhhouceoghhithhsthgvrhesphhosg hogidrtghomheqnecuggftrfgrthhtvghrnhepfeevteetjeehueegffelvdetieevffeu feejleeuffetiefggfeftdfhfeeigeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhithhsthgvrhesphhosghogidrtghomhdpnhgspghr tghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhgrtghosgdrvg drkhgvlhhlvghrsehinhhtvghlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhk vghrnhgvlhdrohhrghdprhgtphhtthhopehjrggtohgsrdhkvghllhgvrhesghhmrghilh drtghomhdprhgtphhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 May 2025 17:10:11 -0400 (EDT) From: Junio C Hamano To: Jacob Keller Cc: , Jacob Keller Subject: Re: [PATCH RFC] diff --no-index: teach option to exclude files by pattern In-Reply-To: <20250514204014.3106177-1-jacob.e.keller@intel.com> (Jacob Keller's message of "Wed, 14 May 2025 13:40:14 -0700") References: <20250514204014.3106177-1-jacob.e.keller@intel.com> Date: Wed, 14 May 2025 14:10:10 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jacob Keller writes: > From: Jacob Keller > > Teach git diff --no-index the ability to exclude files by wildmatch > pattern when recursing through directories. The '--exclude' option > builds up a string list containing the patterns. These are checked with > wildmatch() in the read_directory_contents function. If any pattern > matches, then the file is not included in the directory contents. A quite natural question that comes to mind is: How would we do this for the normal "git diff" that is not the bolted on '--no-index' mode? but ... > The --exclude option is only supported by the --no-index mode. Standard > diff modes support negative pathspecs which is more powerful. I tried to > see if there was a way to add support for negative pathspecs themselves, > but haven't yet figured out if this is possible. ... of course you have thought about it already. I do agree with you that we should figure out how and teach this mode to also use pathspec, not necessarily only the negative ones but positive ones. After all, $ git diff --no-index [