Article View: linux.kernel.git
Article #4065Re: [PATCH] doc: gitignore: rejoin related paragraphs
From: "Matt Hunter"
Date: Sun, 29 Nov 2026 09:15
Date: Sun, 29 Nov 2026 09:15
88 lines
11342 bytes
11342 bytes
On Sat Nov 28, 2026 at 11:51 PM EST, Junio C Hamano wrote:
>
> "Some text" and "another paragraph" leave the reader guessing which
> change caused the split, so citing commit 0f0ce07625 (doc: gitignore:
> clarify pattern base for info/exclude and core.excludesFile, 2026-03-28)
> as the culprit that tore the two connected parts apart would make the
> history clear.
>
> ...
>
> "preceding"?
Oops. Yes, I'll incorporate both of these.
>
> I cannot grok the "is related, however" part of the last sentence.
> Could you clarify?
This is to acknowledge that the "for example" bullet relates to both of
the "separator at beginning or middle" and "separator at end" bullets,
but at the same time point out that the example more obviously shows the
effects of the former point, how slashes at the beginning or middle
anchor the rule to the current .gitignore's directory.
eg: There is an example and a counter-example for that bullet. But _both_
cases involve a rule ending in a slash to match a directory. There is
not a clarifying sentence stating that "a pattern `doc/frotz` will not
match the path `a/doc/frotz`, but it will match `doc/frotz` as a
directory or non-directory".
The wording there is a little rough, but I think you will understand.
>
> In the current text, the five bullets run in this order
[mh: adding numbering to these bullet points, for easier referencing]
>
> (1) The slash "`/`" is used as the directory separator...
>
> (2) If there is a separator at the beginning or middle (or both)...
>
> (3) Patterns read from exclude sources that are outside the working tree...
>
> (4) If there is a separator at the end of the pattern...
>
> (5) For example, a pattern `doc/frotz/` matches `doc/frotz` directory,
> but not `a/doc/frotz` directory; however `frotz/` matches `frotz`
> and `a/frotz` that is a directory (all paths are relative from
> the `.gitignore` file).
In effect, this patch changes two details about the doc:
- Move the interrupting bullet (3) out from the middle of (2), (4),
and (5).
- Swap the order of (2) and (4), specifically to place (2) next to
(5), using my above explanation as a justification.
Though this has led to the problems you've pointed out:
> - the exclude-sources bullet now appears before the document has
> explained what a leading or middle separator does in a .gitignore
> file.
This makes sense, and I will fix.
> - placing the trailing-slash bullet before the beginning-or-middle
> bullet reverses the "beginning, middle or end" order established by
> the introductory bullet.
I somehow missed that (1) establishes this order. Your suggested change
below sounds like the right way to improve things.
The thing that got me to prepare a patch in the first place was the
jarring experience of reading (5) while bullet (2) was falling out of
prominence in my brain, due to being multiple paragraphs up at that
point. Though, your suggestion should make _this_ better as well.
>
> Instead, moving the "Patterns read from exclude sources that are outside
> the working tree..." bullet down after the "For example..." bullet would
> restore the original sequence from commit 1a58bad014 (gitignore.txt:
> make slash-rules more readable, 2019-06-04). It would keep the intro,
> beginning/middle rule, trailing-slash rule, and their combined example
> together, while placing the outside-working-tree note right after "(all
> paths are relative from the .gitignore file)".
Technical Details
Message-ID:
<DN7KWQHLF7Q2.84SK0XQELPSU@lfurio.us>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76619-linux-kernel-git=dewy.ruReferences:
<20261128071613.3386188-1-m@lfurio.us> <xmqq4id0qlze.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76619-linux-kernel-git=dewy.ru
From: m@lfurio.us ("Matt Hunter")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] doc: gitignore: rejoin related paragraphs
Date: Sun, 29 Nov 2026 04:15:01 -0500
Organization: Usenet Network
Message-ID: <DN7KWQHLF7Q2.84SK0XQELPSU@lfurio.us>
References: <20261128071613.3386188-1-m@lfurio.us>
<xmqq4id0qlze.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="1139305"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:fGNyfr68jvN6ondOZa7rDLobhAE= sha256:thhgUvfPk9qnQtnDYHimEx+ZFBhsnxCSIqnbVP8klo0=
sha1:+n8SFVpVmGkLSA0//m0x2vr4Gyc= sha256:UhDexnl/i7Xv2JdkXfV4qeb8wa6RPxh6j0xvlKPICOg=
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 7B830125F96; Sun, 29 Nov 2026 12:15:48 +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 hMbQvFmPNFNn;
Sun, 29 Nov 2026 12:15:45 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76619-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 101B3125F93; Sun, 29 Nov 2026 12:15:37 +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 A63712471F; Sun, 29 Nov 2026 09:15:35 +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=1795943735;
b=TDQwKZ56353q7lQ9eax7XlLKkf7fzgf8q031vC4ch1+kA8kBSNHjXwRBvDpRFVfwySzt
XaPVC5cnegSSR87sFH/GO1zpkfEA6nE9IqBSpNbcrS8KIOMq8+4KCxXOuHjEigNPPBtTf
5Gq30ln/2o2uUJBGjuBG2GA1kHY/CbV2kdYXJxFM2zYlpN2P6DDN4IUx7DY0NZ9dCb3jw
JQRGVwworCMQPXx9vdCmsIb0NsdM8uskg+URAobp6Ld2Tbx2JpjeoXH+JdvMpqv92JAAx
gelftGdO4nHIWEEHjypfr0FHMmmYFrLom597Nf1AXQM4++BO9JnObvmuFExF/+8mqhA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795943735;
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=MEEWkOtpWFiQXu/TvoPbQuNyoTBY/178kTNZ1vJKV6U=;
b=yjCz93XH6xk8UpF6mvXNjxcen5eJfK6SRvoklkmGr5aw9I/huH12Xdaihwin6WhAhqvE
8m6amKHLDGAeSoLgBN4Ofr5fNmnpQ2ITBkdE93sjQXmOXVRuvocfbXluWLC5Yaghx3WiC
+75KcUQAT8Zrbdp2ZoQXIJX9N4Jh5MRZa9iBWcfxApvbQiseGOWNww3WpTlzFp4xKVypS
adNslfNwnJNvv3RYd+Rh+mYeFq7ZjarWSulY36DlPVpEhE8Z2QMYj915r2nPKNIdEyd/M
mvbugT/vQisC+ZEt2y3Cf1ewhNggSCBHbbbPow5cFSnR6yq44L9bkK+/U2XUycboM0w==
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=rfHM5PP7;
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 78780606A327;
Sun, 29 Nov 2026 09:15:35 +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=rfHM5PP7
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=1795943734;
b=Ba5G123IynmnB/lVgXuHkc1OReaX0NO3TO95dZeIT4HkJ7l7IhMtkS8HQuzi6pxOTGZ1
CtbTxPnSisnfO9uOISClO5EJGEf3bSD6ckuGCxyt6GLR2waVYmpDZASsu4OgAtdfJTjWi
7kZtr5rtqV0W9Pm0lW9GBo0dTWwaFmxEEaMYgzzPL3Ja5411iN2G3HbCKEvI9BGnGc/5Y
Ua8qT5bku6IYkIFBrls2KnwLsl03bC85VcrefP7hSQpLMdw4zuQdgoBcAGJVbWyc5qLuW
96tCpJKsTgmDpbo1UyGfuP/dfrPOLISYeFLhZSk3v5ZRkk84uMYNPHGXGbUPkJHinVA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795943734;
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=MEEWkOtpWFiQXu/TvoPbQuNyoTBY/178kTNZ1vJKV6U=;
b=QCZWe5HRxLmG+SMJyyyhNCGkMguxZeBvtXYtMmIVQnPvJuk2bbnCgUIgfgX6NfuQKQuY
7mVoT+dbUvVDNkm1cidzWptWNw4Fa3ldxwqU7Pytof47VCmcy8pLfWl4mOWM1iLgmGAp/
WVGAef1ucdkAeaeCRnr4dzqPU1T/UsKGsX+d3G4CbovIL2+Wc9Wa65RMLW5HWDeqVlyu/
TtuInLt6xLUS40DTqKtmZOk8nLODwNIZYUlnyVHDOVUcXoBSCmZfGJqO3uE5bj4ZNAUDU
AjquOS3Mf79I9kzSEwN0O508S3LlevQqTcbNww89yvvxfSWVSdwJsr2CqP+n8y2WebA==
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=rfHM5PP7;
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 F0E0E606A323
for <git@vger.kernel.org>; Sun, 29 Nov 2026 09:15:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F0E0E606A323
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=1795943727; bh=kqcxaRztb4VZ/g97DwOn6GgwYs1bYhJrskQgxNiMi7Q=;
h=Date:Subject:Cc:To:From:References:In-Reply-To:From;
b=rfHM5PP79Xuz78D+LBYmeqb++zu0GRarJoeq3LsStwvHf06zTx5p8f9PAnUFoHPr5
owSuupVlMF62CUtTql/hKbaqwoAiB9gI8vYU3oZiyjDEYLSNIzdgEapuf8yZVGi2DD
aSUPgaqH9JlNQmmaan7PeDlmUxDbsLBp+BV9Tyyc=
X-Received: by mail.normalmode.org (Postfix) with ESMTPSA id 9D93360665;
Sun, 29 Nov 2026 09:15:27 +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>
X-Mailer: aerc 0.21.0-0-g5549850facc2
X-In-Reply-To: <xmqq4id0qlze.fsf@gitster.g>