From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.152 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795981840; b=LTWq6FRSedFRYhUu22m+mw0XuXiWa86k5kPZ9lSqmY8ZpkAye23hnOZyrbJWEqZ2Mqc0 vtbmLnAJieXP54AvMCNIjk/A8lOuvtWBu9/jJoozSDRRUxKW39c9H4iuueu8TyJ518OIg kyoEuqQ5VyJ+vhk9/pFxjMKyPLLNd3mRjaQ3uua2+WskwSwr4GBWFTMeTX7HcYnyZT5ua +xzuZmthRT8XIYjpLUgSXx0Kl3gqx5erf4aIC91UVjcgvAT6xQu3gn3HxxUmIRg5TDmFI uhnUkyhwle4EFnelXMXcFxK40lq+e7NzWJ+B1B9Pq/XHY+SNsOyWdoTi1DOL7lrGTgA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795981840; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: User-Agent:MIME-Version:Content-Type; bh=81jhfQu5Rkw/rtRSJIUkovznjNQTUSNvErmOP48n8bs=; b=g8/Ii+5VFwb7HcAyLdVC2pbzNmxPB2g/kKiUd8wdbdUtSdgVblhY//FKbK5PJXF/O8di VNs0kS4mNVB3O5nN/Jj3GDSBDaHI8DBus77ZVznYi4tWzK7N1SZl7IoekP+pFgtj2x3+x 83u+pnwprQsDVHp2z9kCkIXmazUibXqi9PU6xXCOyrUMkt7TKav7EYsWZwh0ykUNvYaBl O7KoZtCllS5NK66kVGSVjpSPzaqOR+R/XQnKnpZViDw9+TD01ifPUqbIn7GtuqQpEvYxj pUBy8sF8OlcSWiZcEQjRJ3kI2650W4elKIYaEuZC/nfwiF6LU0z+46Mb4fU3ATnPvMg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b="HM0x/svA"; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="Crw5/WcK"; arc=none smtp.remote-ip=103.168.172.152 Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (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 5D860606A31C for ; Sun, 29 Nov 2026 19:50:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5D860606A31C 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, unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=HM0x/svA; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=Crw5/WcK Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 892441400306 for ; Sun, 29 Nov 2026 14:50:39 -0500 (EST) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-02.internal (MEProxy); Sun, 29 Nov 2026 14:50:39 -0500 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=1795981839; x=1796068239; bh=81jhfQu5Rk w/rtRSJIUkovznjNQTUSNvErmOP48n8bs=; b=HM0x/svA3D9eCfzzXXYQ5iOLJ1 YxALa0aDU5j4K/Y5JKPVrHzBQwbjgqfvnTKQ5sQy7M2hwmUeEVf50nM8RsAkMsmb 6O6Q0QydmDiwrN53T1s3WPwmSXw131gnjUI/7w1JS5gQon/AeheUhI3tNgqXaMzu 4F7jufa3NXfRk2/0hdA5N2//XFFtRpIykyag3I4BxdQVuynW4mZNjMA/hCaQJn6w RXT2UrSIUcWMhW30lYOud1jGz/EiXIT2nQtobQt+mSR1dcSd1QsEiGdCR1VJhfcc /U7WxQQXRfqfxNDJqLdCxIgpKqgou/pRe+oQRq3702UI1M9R3Ved3W1x+oKw== 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= 1795981839; x=1796068239; bh=81jhfQu5Rkw/rtRSJIUkovznjNQTUSNvErm OP48n8bs=; b=Crw5/WcKMM7O+xUwj5sCnIw+Y/gLddd80xZ7vBhDOoJ26hw3xTx YosAnprU+yqX2yJQKGMKGZYcGwhOiymumktVN0N3yGBLN8R47vKAaBvK5dEmD3Ia PCxzyNdBIDMDXGM5h6v1Dp2rd7UvPoMOxMtCLhUy2wDGT2reSe4D1FnSCYy4Dhbz MLUumiDaNz1Bqal7XqQRcoyPwTU9nIywlh1lTY7+bCaz0FcNrE67IJyfruyvsBTk 9OwOJZIg4uTFeVvybwM/iFVjQTK8knsg55XFg1GG2HUZWlHgWMgqv6mpfyO+CnTA Kl6n5xKNrMd5MLHiuW2v+g8iHxnLPtQFzDw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pobox.com a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1795981839; d=pobox.com; mf=PGdpdHN0ZXJAcG9ib3guY29tPg==; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:SMwW1kIzfcB1D1tXV9cd60vB+f1Gg33VMdtDWrKiHkhc3JX vy69TpenM3RkDJvq92jn8jkg26UBF6vAYbDJtJgL/MnAkma507RyxoYw90AOZl9L EQXDOpYozA8sfog4jSz7iAu3UgNAwiAMCbuulamwsDCFKe8Zajg8Xt5A0MIKMr3r ptpxsSwNRURV1LTO1ce2a0ILRsrsBP2rdgNw00mj/DcNVV2NnqE8TEEBXdBokoyM RBelSiBVSqS5utqNzplcmMZwo5ILqV8TQuP3u1y/KZ5HnNFghygnGU3fMJU+uOCu 9in28xserPFm1WcwiaW6mIQGSTLEzLMqsZameMg==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,references,subject,to,user-agent; Message-Instance: m=1; h=sha256:O/kDAaZkqDfwGVh7Vy0TOm9+poKyzvdrt6LuhghiVYw=:OjQuaHObpaPPUrb6/pzKmO9yzdE+3Nb98qN/UsBiSD4=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEZXj4FgfsJoZqE7Js41dIxtO2AWKYj1QupsKLpQz47f58S/cOGYI5Ja5jD8LjOUC r4ojigZgEOze//yQUgvrjKDVU4xHR9qs/N6PAMsJIgEQb5prZiP7cFVAssIJc4V+8XAGsV u6wYThg3ID+XscKW7R+TIIu/t0N5jRXLPWsjVot6VkbQyPNov0Q/5Vw37FYgviZ/tvE7Sd TK3hL7qPob+npeCqoG2QpurWn/d+WMUyrZ/S0qkFF1ibhxj+RwvAhNTfLklvieVsh022Pf gjtKyYvVHcYZH9lYr6GVkvGinSCKntVYCNUPHa5eFrWHoS2+EMfAAndFhSLzh0dQSbAom2 qLioCzbFWgWNgnobqCEKovY8D2+F4IdKpiUYwkoSyJe9+m4HaaqGny2xwOMKsvuR0K/s9P MofHAafsQQ+N4vKJ6cAnMZXdqZ627zyn3Y5ISgRdMgMLcRpRXBtgixyVibE6BJXKcDD4zE FY5AtsY23gKpCN6lgn9qZYbqlQKOh0q4kQhbqFymLxSaUfxYL3+JOzmOMKhufgpOl0MSQS ucFKw6hzbeHh7uXpmfLu6HE2TjOCR00ia7Jj+wNE/ZzbASXqweQlJmWdkiskz4HvhAMbgG Noq5pW6gfploIwO6NqQ2BRc2ZtT0IyK/K79Wn8UaqXC32tAbc97A40MSwxiQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Nov 2026 14:50:39 -0500 (EST) From: Junio C Hamano To: "Matt Hunter" Cc: , "Windl, Ulrich" Subject: Re: [PATCH v3] gitignore: rewrite wildcard description In-Reply-To: (Matt Hunter's message of "Sun, 29 Nov 2026 04:16:45 -0500") References: <07b3498d83424cac87221724b371839a@ukr.de> Date: Sun, 29 Nov 2026 11:50:37 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain "Matt Hunter" writes: > It's unfortunate how long this bullet becomes with all the interjections > stating "/" is excluded. I tried to write a version of this myself to > condense the explanation. It's not much shorter, but is maybe easier to > follow? I dunno. > > - A pair of brackets that enclose characters matches any single > character from the listed characters, and a range notation inside > them, e.g., "`[a-zA-Z]`", behaves as if all the characters in the > range were listed there instead. However a leading "`!`" or "`^`" > negates the list. A slash character "`/`" can not be matched using > this construct, even if the list is negated or a range containing a > slash is present. Wildcard characters "`*`" and "`?`" lose their > special meaning inside a pair of brackets, e.g., "`[*]`" matches an > asterisk and nothing else. 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. 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. - "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`). 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?