Article View: linux.kernel.git
Article #4097Re: [PATCH v3] gitignore: rewrite wildcard description
From: "Matt Hunter"
Date: Mon, 30 Nov 2026 04:53
Date: Mon, 30 Nov 2026 04:53
61 lines
10071 bytes
10071 bytes
On Sun Nov 29, 2026 at 2:50 PM EST, Junio C Hamano wrote: > > This improves over mine on two points by unifying the cases to have > individual characters case and character range in a pair of > brackets, and by stating more explicitly how negation and '/' > exclusion interacts. It probably makes sense to fold the [*?] into > the description on "any single character from the listed characters". > > ... listed there instead. Wildcard characters "`*`" and > "`?`"' lose their special meaning inside a pair of brackets, > e.g., ... nothing else. Agreed > > I personally feel that this also disimproves on two points, though. > > - "However a leading ... negates the list." makes it sound as if it > is a bad thing. It is an additional useful feature, and I'd > prefer to phrase it as such. E.g., > > The list can be negated by having "`!`" or "`^`" as the > first character in the bracket, e.g., "`[^0-9]`" matches > characters that are not ASCII digits. If the interpretation here of "negates the list" is to apply some bad attribute to the list, you could revert back to your phrasing "negates the match" instead. Another possible wording is "invert" instead of "negate". I like what you propose here too, especially if splitting the bullet up like mentioned below. Though as a separate bullet, I would make this change for context: s/The list/A bracketed list/ (or something like that) > > - "A slash character cannot be matched" also makes it sound as if > it is a bad thing. Wildcard sequence matching only one path > component at a time is a feature, and I'd prefer to phrase it as > such. > > Neither bracket construct (negated or not) nor a wildcard > matches the slash "`!`" character, which is matched only by "`/`" > itself (e.g., the pattern "`a/b*`" matches `a/bc` but not > `a/b/c`). This reads well as its own bullet as well. > > Also, it might make it easier to read if we split this large single > bullet into three, by the way. (1) brackets, (2) negation, (3) > slash-exclusion. > > What do you think? As hinted above, I'm in favor of splitting it up this way.
Technical Details
Message-ID:
<DN89Z5SM4TOZ.1O2FW6P94MMPS@lfurio.us>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76654-linux-kernel-git=dewy.ruReferences:
<07b3498d83424cac87221724b371839a@ukr.de> <xmqq5wyjxgyn.fsf@gitster.g> <xmqqh5hx4jz3.fsf_-_@gitster.g> <xmqqcxrowzjn.fsf_-_@gitster.g> <DN7KY29ND3ZO.2AE1ZE3KDJAJ1@lfurio.us> <xmqqqzg3fmcy.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-76654-linux-kernel-git=dewy.ru
From: m@lfurio.us ("Matt Hunter")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v3] gitignore: rewrite wildcard description
Date: Sun, 29 Nov 2026 23:53:39 -0500
Organization: Usenet Network
Message-ID: <DN89Z5SM4TOZ.1O2FW6P94MMPS@lfurio.us>
References: <07b3498d83424cac87221724b371839a@ukr.de>
<xmqq5wyjxgyn.fsf@gitster.g> <xmqqh5hx4jz3.fsf_-_@gitster.g>
<xmqqcxrowzjn.fsf_-_@gitster.g> <DN7KY29ND3ZO.2AE1ZE3KDJAJ1@lfurio.us>
<xmqqqzg3fmcy.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1336679"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:i7erDtSvFechlQuKDWL4UD7FJlk= sha256:UmnYZ4m/OGPn+HZlHFFAHF6YDZLUd9DpPPRw6zjYe9M=
sha1:wrNTalQwSHL6T01BL3Q60f6XmyA= sha256:pISoGY1IjHYUgDpTvfpXSLf0FaM1iP2aUmBxFxd9Z7s=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 31C92125FBC; Mon, 30 Nov 2026 07:54:21 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.951
X-Spam-Status: No, score=-1.951 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
header.d=lfurio.us
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 0l_aGSBnAV2Z;
Mon, 30 Nov 2026 07:54:18 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76654-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lfurio.us
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id C865D125FC0; Mon, 30 Nov 2026 07:54:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id CFB2A26CB3; Mon, 30 Nov 2026 04:54:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796014447;
b=BQwwqOhOzd1MPcPt7WEReuu1s7k4Y8hWXNivEwuG7/FIlLURlPVBq4LaN2c0hj6q0LNJ
HOI2SK1NyfMqHpVd6a3FCuVChkKAA1BS3hO1bbgT8eR0/ZQUfYdu+hWvS+WFx/adj6rHx
zSKadsxJiMomP4Li7o3i1vBhN+HYDgLUszfFrIgisuucpKIeWUwxXeVnvp2L0Ox64mxnG
9wIPDT4GXlpLZ2XNIOCyZQd0RKdpOP8bMoROHFjYfRzZJ4S9nYX9T2UvOLNr9yBrlOwwv
7SHvyQxMk/M3vxZ3GuGXjSOp/0sRE90hQCt/+1j07k0fL87GBHM/xx0MDpRmfr7aRwA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796014447;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:Mime-Version:
Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:Cc:To:
From:X-Mailer:References:In-Reply-To;
bh=vs5pRN8Ht0niG4bSHklyk2SiYfeUhYzBVLmk8De2bNI=;
b=mV6tPt0oqRa/sYNMmHDT+k0Ts+JUaICtPMK5uYd4p9PcqsvrUk0uz5KT0yOj8e58JTYB
zQWCsyQ787g1yrLsePqYTe4cWeRMM4tJVIl9QM6MlDpi3wC1lJMPhr33t7lpnKAft8WCS
u0kfVWAhcusqGfaUgZI+eFa6KLaGPU4dcSFlU2GwaMRKR+OUcM2v97XV+XlHH7M1q2ImG
Mmi44Jn1v4DUGIJYjgwbJ0C/9Y+9zHO7vVhgKRpmY+dx5+0zDliE9/dIm2vb+pcG/C69h
6WudLA3fEG9FWC3cvQ/8dTwyqvCkuk6inTok5LltNFp8zvB9TVCZxfCEDozyPrztUyg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=L+NpENAe;
dmarc=pass header.from=lfurio.us;
spf=pass smtp.mailfrom=lfurio.us;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A6F28606A32D;
Mon, 30 Nov 2026 04:54:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=L+NpENAe
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=157.230.60.252
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796014446;
b=uLchZuhUc3oMjO82Ch5IgMQsQlB/pUuuKBZfS/cnGALEI3xL9JSQNf5drqdqexRhKrGc
Ebraknj8yajU9U6xQsOaFamfi3NdbM9QbuBXtgU3tlaxw7koo4ZzxRWSh8eaJufvOta84
XQ4lsgW7Hx70n2cwg+o1pc88vpXUE9AjL/6uNFUV9TC4mbP7h1RddwzxysDxfIOHhHvjb
cmvoclPgpMPnlwvFpsTnzn5kb2k9HHfhvIulcb+FUyMPMLqF3chnFWAFbhaL5xVsDjMNR
9RoA55u62SaiZ26iTNFKJuS4ruT1rr/KZ+jjOYGhujaXzZzf1kR/6Foj97KUIvn4lrA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796014446;
h=DMARC-Filter:DKIM-Signature:Received:Mime-Version:
Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:Cc:To:
From:X-Mailer:References:In-Reply-To;
bh=vs5pRN8Ht0niG4bSHklyk2SiYfeUhYzBVLmk8De2bNI=;
b=0KiP4+9biqjGkn0jdVLQvFhHZLiAJ1VgJKkBSzaLoOymuaSelcIayFO6BTouK7reKywa
TExx76W8LXUxpnYGkFARgrOf2Aa6RGO6/kfiBhAiq19r7ERhWCuZ53+at7nmZwRklnY/F
43dsDseF/7uabKOo9KFEGN+ev7iMaW2DF76R7X6DA0ag8gRpp6oOZSu8MlF7P/6SCmTPC
HisW3Kt2mnX+35tLWUSx2gbtl8qgm60u1H95xbriokxf4loHTF11otfekAtZIcJuqf4Iq
ww0E4dZGF4oUqiUeRbWyNhVWSENSjUJ9kVmN107RfOLgXYbI48PyWwC9WV6bFiLCRCw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=lfurio.us;
spf=pass smtp.mailfrom=lfurio.us;
dkim=pass header.d=lfurio.us header.i=@lfurio.us header.a=rsa-sha256 header.s=default header.b=L+NpENAe;
arc=none smtp.remote-ip=157.230.60.252
X-Received: from mail.normalmode.org (h01.normalmode.org [157.230.60.252])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37BDF606A31C
for <git@vger.kernel.org>; Mon, 30 Nov 2026 04:54:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 37BDF606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lfurio.us
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lfurio.us
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lfurio.us; s=default;
t=1796014444; bh=b5bpLg44aBuTwaCdEZ+srxrH+HkWuVvIKY6Wp7TWFxk=;
h=Date:Subject:Cc:To:From:References:In-Reply-To:From;
b=L+NpENAezPrprr7qZHC/qZGZVtp/pLgjqaSPCQ5NkDiKoptnQrpAmfCjy4BScWte8
zv4uHhzp1gyOQmOQI+S46eXZwkl/jHKDXZ/hdqOp4rO0sFQJmrkK3uMHOb6o/N+rZ5
6yf7a2YpHgAvZ3KedmDBy0PlkcodfnyUc7G7YbjU=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id CE338600E7;
Mon, 30 Nov 2026 04:54:04 +0000 (UTC)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: <git@vger.kernel.org>, "Windl, Ulrich" <u.windl@ukr.de>
X-Mailer: aerc 0.21.0-0-g5549850facc2
X-In-Reply-To: <xmqqqzg3fmcy.fsf@gitster.g>