From nobody Fri Feb 11 14:50:39 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7152E19B0A3A; Fri, 11 Feb 2022 14:50:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JwGkp06yTz4kWw; Fri, 11 Feb 2022 14:50:42 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644591042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2s3RR4U2NHvJI3ggwFHlg6GzB6kA9NHLuKZXayUA7vM=; b=iuy7PUxHk9DetYaZY+2DGNmJUT6J96PVs9U1N/ktYolH6BtBO890QXpnKHqCarUr3MQsSI n6vzo5clfYR+m2vFSHsUD4Th9trXEeJmo7HIBl+Lw4PEXCJ2EIqOFDXnt9vIapjiOoK6tV F8nwD7BqKhr9DEoMEEUcNln+5062TzZu+dfhjTX4711vjCojP+s4DRj1TO++9M/ppQn0QC vuUThXwu5hrDV7NKuCpqjLwowrqz8qmi9MnKUQm4zyKyLzEUjfTTTF/owiHYlWwAFJvcyB SXZOO6QS3L+8+3ePJ59AWch5fclAPJ8ZopofRZC1GAlAmVmREZ/6iKkZg0AVeg== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id BF40BC4C2; Fri, 11 Feb 2022 14:50:41 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 108962852E; Fri, 11 Feb 2022 15:50:40 +0100 (CET) From: Kristof Provost To: Drew Gallatin Cc: Andrew Gallatin , "Alexander V. Chernikov" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Conrad Meyer , Andriy Gapon Subject: Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig Date: Fri, 11 Feb 2022 15:50:39 +0100 X-Mailer: MailMate (1.14r5852) Message-ID: <6CFFB341-C17E-427D-99B8-E640505B83CB@FreeBSD.org> In-Reply-To: References: <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu> <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_DE4680ED-4562-4D6E-882A-8C0E25C4755B_=" Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644591042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2s3RR4U2NHvJI3ggwFHlg6GzB6kA9NHLuKZXayUA7vM=; b=sModNZLrnyLJOcPoVyoaPFi/Yd+XFPJ3rSxx6Sw6ilYbv5PcdqiY64lcjykDQPt7EA8r+h YcE4TWi3Zq1COBT/lYugVoB7sbGXWuOXRHU3s5W0dllNwVL0JsZvkmCNEOpkRhNvoxBnSB 6PW4H+UxEmmtz4fvNM7muviN+DMDlDmhWrby1mGL0EwJjkzUuN8ZjJ3yqPd+wOmqUHIZ4g 8XeioNT/WlprKvFNdiMh5j17s82mfxepM7HpnsvrGaJUvszJBjwnQiSIL/9f+UTXbbCNHH 34Gkge44u40jaKXx+r7BFcZVIPDfEKeDK7iO41R6Y308z+6a1MNrp2FTcX8stA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644591042; a=rsa-sha256; cv=none; b=VeQ0eTOomzWl9rIEtXqqLlnfBmlN+W4+Vlp7AAcCJ8qRjYFIBcFPKF4jxNB3iL32dsgCwE JZt/LmUM+KI4WQ+AuSm2ZU0UDv8kriwplI5YtxDRJScFaXWfPNhfkhKBAyDZ/P1aiRav33 Mv0Z5rXv9JYQbKcUPeAhXChB3n5Yo0mvIb96ae5rsxDNItniwDGxrHn1bcDm0p5JWoqnVy PgaMGK9B5h7XolYF0vGXIiDtxx7COqo9hBik/Y3QEDjp7G8ulPFNuyPbOR678YtIvn01Bq 5O9wCGM7iYkmsp3hvt3Na9ZXkSVTM8UzHLSQz4oXMhr3AjI927yoU48O3b4mRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --=_MailMate_DE4680ED-4562-4D6E-882A-8C0E25C4755B_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11 Feb 2022, at 15:38, Drew Gallatin wrote: > The problem seems to be that all of these solutions are processed > *FIRST*, > before a .gitignore in the repo, so they cannot be used to negate a > gitignore rule in the repo. Eg: > The man page claims this: When deciding whether to ignore a path, Git normally checks gitignore patterns from multiple sources, with the following order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome): And then lists command line, .gitignore file in the same directory as the path, or in any parent directory, GIT_DIR/info/exclude and core.excludesFile. So it’s does check them in the order you’d expect, but apparently does not let GIT_DIR/info/exclude overrule .gitignore. That’s a bit unfortunate. I’d really have expected a ‘!*.orig’ in GIT_DIR/info/exclude to overrule the .gitignore, but I’ve also tested it and it doesn’t. > This makes a stronger case that those who want to ignore .orig and > .rej > files can add them to *their* local .gitignore, and we should back > them out > of the .gitignore for the project. > I don’t really like it (for the usual reasons: .orig & friends should pretty much never get checked in, so .gitignore is appropriate. Your workflow is a bit unusual, so ideally you’d do the special thing.), but yeah, it looks like we should indeed remove them from .gitignore in the repo. Kristof --=_MailMate_DE4680ED-4562-4D6E-882A-8C0E25C4755B_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 11 Feb 2022, at 15:38, Drew Gallatin wrote:

The problem seems to be that all of= these solutions are processed *FIRST*,
before a .gitignore in the repo, so they cannot be used to negate a
gitignore rule in the repo. Eg:


The man page claims this:

When deciding whether
to ignore a path, Git normally checks gitignore patterns from multiple
sources, with the following order of precedence, from highest to lowest
(within one level of precedence, the last matching pattern decides the
outcome):

And then lists command line, .gitignore file in the same = directory as the path, or in any parent directory, GIT_DIR/info/exclude a= nd core.excludesFile.

So it=E2=80=99s does check them in the order you=E2=80=99= d expect, but apparently does not let GIT_DIR/info/exclude overrule .giti= gnore. That=E2=80=99s a bit unfortunate. I=E2=80=99d really have expected= a =E2=80=98!*.orig=E2=80=99 in GIT_DIR/info/exclude to overrule the .git= ignore, but I=E2=80=99ve also tested it and it doesn=E2=80=99t.

This makes a stronger case that tho= se who want to ignore .orig and .rej
files can add them to *their* local .gitignore, and we should back them o= ut
of the .gitignore for the project.


I don=E2=80=99t really like it (for the usual reasons: .o= rig & friends should pretty much never get checked in, so .gitignore = is appropriate. Your workflow is a bit unusual, so ideally you=E2=80=99d = do the special thing.), but yeah, it looks like we should indeed remove t= hem from .gitignore in the repo.

Kristof

--=_MailMate_DE4680ED-4562-4D6E-882A-8C0E25C4755B_=--