Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2022 20:12:24 +0000
From:      "Alexander V. Chernikov" <melifaro@ipfw.ru>
To:        Kristof Provost <kp@FreeBSD.org>
Cc:        Drew Gallatin <gallatin@netflix.com>, Andrew Gallatin <gallatin@cs.duke.edu>, "Alexander V. Chernikov" <melifaro@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Conrad Meyer <cem@freebsd.org>, Andriy Gapon <avg@freebsd.org>
Subject:   Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig
Message-ID:  <F9144C7C-6CAA-4633-B0DD-8E09601007FA@ipfw.ru>
In-Reply-To: <6CFFB341-C17E-427D-99B8-E640505B83CB@FreeBSD.org>
References:  <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu> <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org> <CADLQ3sKdAvci47RxK=Vqg4JA0Wff2z9dcuDrByWNdendQu=M%2Bw@mail.gmail.com> <6CFFB341-C17E-427D-99B8-E640505B83CB@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 11 Feb 2022, at 14:50, Kristof Provost <kp@FreeBSD.org> wrote:
>=20
> On 11 Feb 2022, at 15:38, Drew Gallatin wrote:
>=20
> The problem seems to be that all of these solutions are processed =
*FIRST*,=20
> before a .gitignore in the repo, so they cannot be used to negate a=20
> gitignore rule in the repo. Eg:
>=20
>=20
> The man page claims this:
>=20
> 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):
>=20
> 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.
>=20
> So it=E2=80=99s does check them in the order you=E2=80=99d expect, but =
apparently does not let GIT_DIR/info/exclude overrule .gitignore. =
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 =
.gitignore, but I=E2=80=99ve also tested it and it doesn=E2=80=99t.
>=20
> This makes a stronger case that those who want to ignore .orig and =
.rej=20
> files can add them to *their* local .gitignore, and we should back =
them out=20
> of the .gitignore for the project.
>=20
>=20
I don=E2=80=99t have a _strong_ opinion on keeping .orig/.rej. Again, =
.gitignore is for people's convenience. Given there=E2=80=99s no good =
way for overriding these with local configuration - probably it=E2=80=99s =
better to not have the in our repo indeed.
I raised https://reviews.freebsd.org/D34254 & added Andrew&all original =
reviewers there.

> I don=E2=80=99t 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=E2=80=99d do the special =
thing.), but yeah, it looks like we should indeed remove them from =
.gitignore in the repo.
>=20
> Kristof
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F9144C7C-6CAA-4633-B0DD-8E09601007FA>