From nobody Fri Feb 11 20:12:24 2022 X-Original-To: dev-commits-src-all@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 AAAE919B926E; Fri, 11 Feb 2022 20:12:38 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501j.mail.yandex.net (forward501j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JwPtF1YvKz4n8s; Fri, 11 Feb 2022 20:12:36 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from iva3-22c7ad945a2f.qloud-c.yandex.net (iva3-22c7ad945a2f.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:4918:0:640:22c7:ad94]) by forward501j.mail.yandex.net (Yandex) with ESMTP id 0BE3162342B; Fri, 11 Feb 2022 23:12:27 +0300 (MSK) Received: from iva8-a4a480c9f089.qloud-c.yandex.net (iva8-a4a480c9f089.qloud-c.yandex.net [2a02:6b8:c0c:da5:0:640:a4a4:80c9]) by iva3-22c7ad945a2f.qloud-c.yandex.net (mxback/Yandex) with ESMTP id HCbE22feNe-CQdGQpHO; Fri, 11 Feb 2022 23:12:26 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1644610346; bh=J0h+1wV2TNma3CkR26t7MW0NsrmqdsUyRyET1uzWi6E=; h=Subject:Cc:From:To:Message-Id:In-Reply-To:References:Date; b=vPcfQ7a7wNcfVPNAYNf3ZZ1fr5uaB1F1AiLKA6O9EvUxOys/ZUn+PQIe7by1RdHY5 hkg9d/FqOL9Xgs+wcYy3iSmd+I7mNWFmO+HTS8hBHwBm5OL4Z923dl5fE3yI+pVVFu lXglWyD82QUpyU7s5DilShwEYYWv19yoGD9qLhOU= Received: by iva8-a4a480c9f089.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id lS0aq5YfVX-CPHWlJ0N; Fri, 11 Feb 2022 23:12:26 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig From: "Alexander V. Chernikov" In-Reply-To: <6CFFB341-C17E-427D-99B8-E640505B83CB@FreeBSD.org> Date: Fri, 11 Feb 2022 20:12:24 +0000 Cc: Drew Gallatin , 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 Content-Transfer-Encoding: quoted-printable Message-Id: References: <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu> <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org> <6CFFB341-C17E-427D-99B8-E640505B83CB@FreeBSD.org> To: Kristof Provost X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Rspamd-Queue-Id: 4JwPtF1YvKz4n8s X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=vPcfQ7a7; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 2a02:6b8:0:801:2::111 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-3.10 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; FREEFALL_USER(0.00)[melifaro]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0::/52]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ipfw.ru]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[ipfw.ru:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[9]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:208722, ipnet:2a02:6b8::/32, country:FI]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[2a02:6b8:0:801:2::111:from] X-ThisMailContainsUnwantedMimeParts: N > On 11 Feb 2022, at 14:50, Kristof Provost 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