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: > > 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 have a _strong_ opinion on keeping .orig/.rej. Again, .gitignore is for people's convenience. Given there’s no good way for overriding these with local configuration - probably it’s better to not have the in our repo indeed. I raised https://reviews.freebsd.org/D34254 & added Andrew&all original reviewers there. > 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F9144C7C-6CAA-4633-B0DD-8E09601007FA>
