Article View: linux.kernel.git
Article #2270Re: Q: .gitignore and asterisk "*"
From: Tuomas Ahola
Date: Tue, 03 Nov 2026 17:29
Date: Tue, 03 Nov 2026 17:29
40 lines
10963 bytes
10963 bytes
Junio C Hamano <gitster@pobox.com> wrote: > Tuomas Ahola <taahol@utu.fi> writes: > > > Junio C Hamano <gitster@pobox.com> wrote: > > > >> "Windl, Ulrich" <u.windl@ukr.de> writes: > > Please trim the lines that do not have any relevance to what you are > going to comment on from your quoted material. > > >> - - An asterisk "`*`" matches anything except a slash. > >> - The character "`?`" matches any one character except "`/`". > >> - The range notation, e.g. `[a-zA-Z]`, can be used to match > >> - one of the characters in a range. See fnmatch(3) and the > >> - FNM_PATHNAME flag for a more detailed description. > >> + - An asterisk "`*`" matches string of any length, and a question mark > > > > It's not unreasonable at all to call the empty string "a string of no length", > > so it is still a bit ambiguous whether it qualifies as a string of any length. > > I would suggest s/of any length/of length of zero or more/. > > A string of no length falls within the set of strings of any length, > so I do not see any ambiguity there. > > "A string of length of zero or more" is a roundabout way to say "any > string" as by definition there is no string of negative length. > Perhaps that is good enough? As you wish, although I would like to point that both Linux and BSD versions of glob(7) are quite explicit in their wording: A '*' (not between brackets) matches any string, including the empty string. and * Matches any sequence of zero or more characters. (Just thinking aloud.)
Technical Details
Message-ID:
<20261103172943.DKwn8%taahol@utu.fi>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74330-linux-kernel-git=dewy.ruReferences:
<07b3498d83424cac87221724b371839a@ukr.de> <xmqq5wyjxgyn.fsf@gitster.g> <20261103073317.DATcL%taahol@utu.fi> <xmqqzevpald4.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74330-linux-kernel-git=dewy.ru From: taahol@utu.fi (Tuomas Ahola) Newsgroups: linux.kernel.git Subject: Re: Q: .gitignore and asterisk "*" Date: Tue, 3 Nov 2026 19:29:43 +0200 Organization: Usenet Network Message-ID: <20261103172943.DKwn8%taahol@utu.fi> References: <07b3498d83424cac87221724b371839a@ukr.de> <xmqq5wyjxgyn.fsf@gitster.g> <20261103073317.DATcL%taahol@utu.fi> <xmqqzevpald4.fsf@gitster.g> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: usenet.network; logging-data="3245010"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:mj3pFYBJzLBNsP6AlBCqQPakSkM= sha256:NT8MRy01joIsBGb3G7NMwVLkL+gpCny7jKXh3SR/79k= sha1:CIT8TW2j0d7ssqEkLE0r8u4mBNE= sha256:uyvFP95TKyPBge11MAJvRiAqy3T/11uZwSlVioeHz/o= 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 866271129E3; Tue, 3 Nov 2026 22:39:52 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.95 X-Spam-Status: No, score=-1.95 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, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=utu.fi 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 PoGXgAhEhlLs; Tue, 3 Nov 2026 22:39:48 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-74330-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=utu.fi X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 28FCA112628; Tue, 3 Nov 2026 22:39:37 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 71A0D303C3; Tue, 3 Nov 2026 17:29:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1793726993; b=kSiRWBaFLAEuukesQoxghbfLBc5IhYUobLOlQEmj1uL9ujG+tWMZ1zB2t2FpuU6UpHSz tzL3ok32pTpHgdzo+hZrTUHf1PSy8A80PLgVzAuP347HsXOi6EfV//GfJ1HunZIpkJXEQ 34xpU7xNKDUPoVrXvHmDSD46Ocj/3BKMR3+DeipjpGvpkftZI4UlPa9qL9/x1UIfBs3pT YUtyrPYk9ZGR6OioAYWIsJqFzCD/jL7lfTdMcXHJM/fR3Yy8LspSCFkerNPFNyIz2Lq9L nl38P9FQt3K+d0h9qqJygtgTenO0rfPVwiiAzDD/ct4Sssugx0uUodUrNVR0TqC9Jfw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793726993; h=X-Original-To:Received:DMARC-Filter:Received:Received:Received: Received:Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: User-Agent:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: X-ClientProxiedBy:X-FEAS-BEC-Info:X-FEAS-Client-IP: X-FE-Last-Public-Client-IP:X-FE-Policy-ID:X-FE-Hostname: DKIM-Signature; bh=qsyJCAM0gdLCi4al8232IaiY7SC64pTyyxU4PbKo0Ko=; b=2w/8rVlsczctjoM9EyXtUYpPxwvZWkTV7yO5Vzt5bgZK9NJNcYbRdbTzx5LGrpoQ22Qr m2SrcyNFRZag6UFj9reW9UWPcLumMjdaTnGdix7sGXb53XPURRtEUnKH5nXoLDzyvZ4pJ RIl9sur/V3Lh9z3jQ0C2EIBXf187v8CmxYAbhU9/iGRT43wKBVymswwiNNqhAimeSI4nQ 9okNQcke/fYFjPBpTBTJZcbk7QJmRrrp9maG7qAKCwrb9YNz/W34JBtcLJJcr7bdT1G/t SXzF718y+zBfVcyb+1aP20Cj9po6imyyHkuUCYExWiaDNbL1P8RtjCCrLA15OsiTCNQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=fKUfYKhP; dmarc=pass header.from=utu.fi; spf=pass smtp.mailfrom=utu.fi; arc=fail 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 5E3C8606A331; Tue, 3 Nov 2026 17:29:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=fKUfYKhP X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=130.232.247.4 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793726992; b=CbJl0iye+5fIceqaBXnnJcSTu7VWebiTokdHhPTIhWKVSkmlTfUz3v7Bj12H7DemNPyZ F1Pm/uRvmzlLRHybNLZueJEfM99rguP3QAlc0ubYX+H0JP4p7MNgv4xPK73PwwsTi7WYY iBv33EJWigUbv4T0znHqLUFZ5R/DKG8gN982bLyXJexexh/h7SU6MZU1CQ4+NnvsWx3/9 VCc1CfbaW14yP7MK49IoWAGgEUpGuLPWBZVbqpSfc6DXY6/1StF6o6WpNUx68xXOZAXBE zqxCZbPw4oZMBHA9bRuHPVYHkgcxg+vZ9csM2ouO4XIc6r6XxtXQOEySZMoo3MUOX/w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793726992; h=DMARC-Filter:Received:Received:Received:Received:Date:From:To:CC: Subject:Message-ID:In-Reply-To:References:User-Agent:MIME-Version: Content-Type:X-Originating-IP:X-ClientProxiedBy:X-FEAS-BEC-Info: X-FEAS-Client-IP:X-FE-Last-Public-Client-IP:X-FE-Policy-ID: X-FE-Hostname:DKIM-Signature; bh=qsyJCAM0gdLCi4al8232IaiY7SC64pTyyxU4PbKo0Ko=; b=rpaau8oi0YHOA8RuArqtrtVF0tUtnUaW+jwluNkQ6ZjPj0oaVjKL9XaqFjChYEvR0iAT PuYFy9ObeYFYwFa5wmRSVGZ1zSzf/sN9e/A8yaYInE48zEBfYLiEX7st1cbdth4WyJoX8 8zRLmRIqAX7OPH3SJy9Wu0XJ9ozraOHRV+smUSBMeW3c3X09wj4RyxOFBYtzd2lGMrEJB 3oruY+KtzSKs6UfEaxNgt1q7pBuzHIW5xnGhlyR6nGeCnx04/9lMTOZ1xUyL/3mM8wRdu 1aLNTsl/rjq45zVRTGFv1iajHcOH/cEHuqtjRha0TytcuWz7mpaekxrz3YzdsgPTocA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=utu.fi; spf=pass smtp.mailfrom=utu.fi; dkim=pass header.d=utu.fi header.i=@utu.fi header.a=rsa-sha256 header.s=out-utu-v3 header.b=fKUfYKhP; arc=none smtp.remote-ip=130.232.247.4 X-Received: from fortymile.utu.fi (fortymile.utu.fi [130.232.247.4]) (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 1D28F606A31B for <git@vger.kernel.org>; Tue, 3 Nov 2026 17:29:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1D28F606A31B X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=utu.fi X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=utu.fi X-Received: from smtp-04.utu.fi (smtp-04.utu.fi [130.232.207.47]) by fortymile.utu.fi with ESMTPS id 6A3HTiPj004243-6A3HTiPl004243 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 3 Nov 2026 19:29:44 +0200 X-Received: from ex19-06.utu.fi ([130.232.247.46]) by smtp-04.utu.fi with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <taahol@utu.fi>) id 1xOIKO-001cDp-8M; Tue, 03 Nov 2026 19:29:44 +0200 X-Received: from localhost (86.50.95.90) by ex19-06.utu.fi (130.232.247.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Tue, 3 Nov 2026 19:29:43 +0200 X-Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id cd0e2c86; Tue, 3 Nov 2026 17:29:43 +0000 (UTC) X-CC: "Windl, Ulrich" <u.windl@ukr.de>, "git@vger.kernel.org" <git@vger.kernel.org> X-In-Reply-To: <xmqqzevpald4.fsf@gitster.g> X-User-Agent: s-nail v14.9.22 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-ClientProxiedBy: ex19-15.utu.fi (130.232.247.55) To ex19-06.utu.fi (130.232.247.46) X-FEAS-BEC-Info: WlpIGw0aAQkEARIJHAEHBlJSCRoLAAEeDUhZUEhYSFhIWkhZXkguLT4lWFxYWFhYWFBeUVxfSFhISFlbSBwJCQAHBCgdHB1GDgFIWUhZXEgdRh8BBgwEKB0DGkYMDUhY SFpIWVxIWVtYRlpbWkZaWF9GXF9IUEhYSFhIW0hYSFhIWEhZUUgPARwoHg8NGkYDDRoGDQRGBxoPSFhIWV9IDwEcGxwNGigYBwoHEEYLBwVIWEhZXEgdRh8BBgwEKB0D GkYMDUhY X-FEAS-Client-IP: 130.232.207.47 X-FE-Last-Public-Client-IP: 130.232.207.47 X-FE-Policy-ID: 3:5:2:SYSTEM X-FE-Hostname: fortymile.utu.fi X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=utu.fi; s=out-utu-v3; c=relaxed/relaxed; h=date:from:to:cc:subject:message-id:references:mime-version:content-type; bh=qsyJCAM0gdLCi4al8232IaiY7SC64pTyyxU4PbKo0Ko=; b=fKUfYKhPqELWA5ci1khzHvFCcojsutcv38tE12yyxn/iuCgZ7rLqvtC5ZuXhoxhM6nekcKb3n+Vi XsnDIKYDO5epRpj/+nG4b0UvXYzFIm0B6EFxd9MG7s5fwVkAp2IAXon4A2Oq4T0HbIp6cDi7A5eG 4+wUYCTBQEvd1CzCjqIB/mFPjW/I3UlkB57NECTychBPxrKdbOX63eEeaO/SEX/354kM32CJKDFP 3f78czY3b0JtTubYHkcecLhwpUIMsmpFGe92q3tHWRQVCAzkG82qsHJ9Xc8YLqiUE94T8gcqKHw5 Hv38GTs5fkPRciWKg0fHcxiRwbbQFK+NT2hUQg==