From nobody Fri Feb 11 14:58:31 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 ED5E219B5655; Fri, 11 Feb 2022 14:58:36 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4JwGvw6Kx4z4n0H; Fri, 11 Feb 2022 14:58:36 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644591516; 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=rAdnlnwAVThjuXtYObcKyCVdlqJNQLBmxkVGyWAtw0Y=; b=ah03ZIKt8zvxpbMInDGEHnSL4zBnsEtj513yILAbLSEcpQxkXbNO3OjfqDjxL/ocaZvNgs P7M7pvk6XBYwkZeYcETIOFTxtxUrl4fTs65MtT84OvvhkSw50sKJj7WTPEwZHFUdKwGzw4 S0sawcxQaSZuiP5UFOMRNVtvbOTXweYQIty3K7yO5g744sgTNJ29xOLYHgIRkXSCC/UnjH T4dM71VHmtKVk68Tp6UGYf6iGgerC4YmHv0tjDhZ4AB+GljTo8kla0GYWQgEXUQYhKq9jN c22HxteOjPJH78YsD/g8I8ivB154J6/u20UPEtFs6ye0eM3UuwjiCtLSVhH6UA== Received: from [172.21.4.170] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4A3B0CB79; Fri, 11 Feb 2022 14:58:35 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <4f4f6a83-3def-4938-6e40-5460486cc415@FreeBSD.org> Date: Fri, 11 Feb 2022 11:58:31 -0300 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 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig Content-Language: en-US To: Drew Gallatin , Kristof Provost 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 References: <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu> <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org> From: Renato Botelho In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644591516; 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=rAdnlnwAVThjuXtYObcKyCVdlqJNQLBmxkVGyWAtw0Y=; b=N/pLoyK4fIirZKiyWEJc+IwyBnUCWoHhMVs+WfFM6OTqVGBgTBtygcRWFvEiVliE58fILA 299Mg8ZaRdJDZOoJ/iJUe7GoV3/xA2kB8Mf40L6NwvJ6d6tUaHyT3GUZ7P8mn6Tn69CBFu mww25HkCQmsXcqn8EwlJOto3p4q2IWurWQBFru30BZAtW/dhrbuMZTSroQSFrBolI1xm6F 8ZbSs4NhouPVVWPp9Pxa2QesS6Vsl2E7sFT0v0b70olXkax8t8VgSEDQfbWChOSrQmvmXu xpO8HPAmjNofP8QaN9rmqC5+tkPBpFURmbdkvRh2d8EXOQF2vDmFFWFhIgvprA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644591516; a=rsa-sha256; cv=none; b=RoAVxkHwYg5j6Fz3jLMzWw3ap9DjCs/uqP5Y32IaFhprD0HfLdzTmmByjayh+nB0sHBjR6 +Qc/cETZdt+mkVMtfS8M6JOZeGSK5dbS3B762l9a+Yo8TkHnfVpfuM7sqVdl45ipTNGrQC aAkH9+MyvOEfc6Q1WIY+RknZibFN+89VsMgDO3DhpvG9y8dAX8uJy5muh21ZKO4XIlat8z tI6/jV+6cIAuZfsg0Dvpnexy0A/6ExRkrU+fwaO14zlpghEOAazyFMu2BbHRI3v+aLGNLZ Ho/TK0/cGfgMF+hfWRyt4RUN3YFJDBQWwFe3C/8BoWthArK3cwVgwZ64HeEOuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 11/02/22 11:38, Drew Gallatin wrote: > > > On Fri, Feb 11, 2022 at 4:38 AM Kristof Provost > wrote: > > __ > > On 11 Feb 2022, at 2:25, Andrew Gallatin wrote: > > On 1/17/22 04:35, Alexander V. Chernikov wrote: > > The branch main has been updated by melifaro: > > URL: > https://urldefense.com/v3/__https://cgit.FreeBSD.org/src/commit/?id=b1f7154cb12517162a51d19ae19ec3f2dee88e11__;!!OToaGQ!4Lozvj8S2Opxre6qHuywX_aNhwm1heXl1CyQyb0N5f_fiBJEkTQGhLzE7KlqqP9C7A$ > > > commit b1f7154cb12517162a51d19ae19ec3f2dee88e11 > Author: Alexander V. Chernikov > AuthorDate: 2022-01-08 16:14:47 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2022-01-17 09:35:15 +0000 > > gitignore: ignore vim swap files & .rej/.orig > Reviewed by: cem, avg > MFC after: 2 weeks > > Hi, > > I was wondering if you might consider reverting this change? > Alternatively, can you teach me how to override this file > locally without carrying a diff? > > I'm asking because this makes life painful for my workflow. > > Having git clean be able to handle .orig and .rej is incredibly > handy when applying large patch sets. It makes finding a rejected > patch as simple as 'git clean -n | grep rej'. > > > Would ‘git clean -n -x’ work for you? > > |-x Don’t use the standard ignore rules (see gitignore(5)), but > still use the ignore rules given with -e options from the command > line. This allows removing all untracked files, including build > products. This can be used (possibly in conjunction with git restore > or git reset) to create a pristine working directory to test a clean > build. | > > > Yes, except it would delete our .obj directories, which I don't want. > The -x is how I figured out the .gitignore had been changed. > > Alternatively, the gitignore(5) man page also mentions that patterns > can be listed in > > |• Patterns read from $GIT_DIR/info/exclude. • Patterns read from > the file specified by the configuration variable core.excludesFile. | > > So I’d think you can overrule things you don’t like from the repo > gitignore file in $GIT_DIR/info/exclude or in your global git > configuration, especially combined with this: > > |• An optional prefix "!" which negates the pattern; any matching > file excluded by a previous pattern will become included again. It > is not possible to re-include a file if a parent directory of that > file is excluded. Git doesn’t list excluded directories for > performance reasons, so any patterns on contained files have no > effect, no matter where they are defined. Put a backslash ("\") in > front of the first "!" for patterns that begin with a literal "!", > for example, "\!important!.txt". | > > Kristof > > > 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: > > <9:32am>beast/gallatin:work1>kdump | grep NAMI | egrep > exclude\|gitignore | head >  42947 git      NAMI  "/home/gallatin/.gitignore" >  42947 git      NAMI  "/home/gallatin/.gitignore" >  42947 git      NAMI  "/data/ocafirmware/.git/info/exclude" >  42947 git      NAMI  "/data/ocafirmware/.git/info/exclude" >  42947 git      NAMI  ".gitignore" >  42947 git      NAMI  "FreeBSD/.gitignore" > > 9:34am>beast/gallatin:work1>cat ~/.gitignore > !*.orig > !*.rej > > <9:35am>beast/gallatin:work1>git clean -n | grep rej > <9:35am>beast/gallatin:work1>git clean -xn | grep rej > Would remove FreeBSD/sys/dev/mlx5/mlx5_en/en_hw_tls.h.rej > > 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. What about -e parameter? Something like: git clean -x -e '*.obj' -- Renato Botelho