Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2022 10:38:16 +0100
From:      Kristof Provost <kp@FreeBSD.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        "Alexander V. Chernikov" <melifaro@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, gallatin@netflix.com, Conrad Meyer <cem@freebsd.org>, Andriy Gapon <avg@FreeBSD.org>
Subject:   Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig
Message-ID:  <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org>
In-Reply-To: <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu>
References:  <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu>

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

--=_MailMate_E4A34644-1547-4932-84FE-3FB51D1FD281_=
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

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=3D=
b1f7154cb12517162a51d19ae19ec3f2dee88e11__;!!OToaGQ!4Lozvj8S2Opxre6qHuywX=
_aNhwm1heXl1CyQyb0N5f_fiBJEkTQGhLzE7KlqqP9C7A$
>>
>> commit b1f7154cb12517162a51d19ae19ec3f2dee88e11
>> Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
>> AuthorDate: 2022-01-08 16:14:47 +0000
>> Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
>> 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 =E2=80=98git clean -n -x=E2=80=99 work for you?

        -x
            Don=E2=80=99t 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.

Alternatively, the gitignore(5) man page also mentions that patterns can =

be listed in

        =E2=80=A2   Patterns read from $GIT_DIR/info/exclude.

        =E2=80=A2   Patterns read from the file specified by the configur=
ation =

variable
            core.excludesFile.

So I=E2=80=99d think you can overrule things you don=E2=80=99t like from =
the repo =

gitignore file in $GIT_DIR/info/exclude or in your global git =

configuration, especially combined with this:

        =E2=80=A2   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=E2=80=99t 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
--=_MailMate_E4A34644-1547-4932-84FE-3FB51D1FD281_=
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
</head>
<body><div style=3D"font-family: sans-serif;"><div class=3D"markdown" sty=
le=3D"white-space: normal;">
<p dir=3D"auto">On 11 Feb 2022, at 2:25, Andrew Gallatin wrote:</p>
</div><div class=3D"plaintext" style=3D"white-space: normal;"><blockquote=
 style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136=
BCE; color: #136BCE;"><p dir=3D"auto">On 1/17/22 04:35, Alexander V. Cher=
nikov wrote:</p>
<blockquote style=3D"margin: 0 0 5px; padding-left: 5px; border-left: 2px=
 solid #136BCE; border-left-color: #4B89CF; color: #4B89CF;"><p dir=3D"au=
to">The branch main has been updated by melifaro:</p>
<p dir=3D"auto">URL: <a href=3D"https://urldefense.com/v3/__https://cgit.=
FreeBSD.org/src/commit/?id=3Db1f7154cb12517162a51d19ae19ec3f2dee88e11__;!=
!OToaGQ!4Lozvj8S2Opxre6qHuywX_aNhwm1heXl1CyQyb0N5f_fiBJEkTQGhLzE7KlqqP9C7=
A$">https://urldefense.com/v3/__https://cgit.FreeBSD.org/src/commit/?id=3D=
b1f7154cb12517162a51d19ae19ec3f2dee88e11__;!!OToaGQ!4Lozvj8S2Opxre6qHuywX=
_aNhwm1heXl1CyQyb0N5f_fiBJEkTQGhLzE7KlqqP9C7A$</a></p>
<p dir=3D"auto">commit b1f7154cb12517162a51d19ae19ec3f2dee88e11
<br>
Author:     Alexander V. Chernikov &lt;melifaro@FreeBSD.org&gt;
<br>
AuthorDate: 2022-01-08 16:14:47 +0000
<br>
Commit:     Alexander V. Chernikov &lt;melifaro@FreeBSD.org&gt;
<br>
CommitDate: 2022-01-17 09:35:15 +0000</p>
<p dir=3D"auto">     gitignore: ignore vim swap files &amp; .rej/.orig
<br>
         Reviewed by:    cem, avg
<br>
     MFC after:      2 weeks</p>
</blockquote><p dir=3D"auto">Hi,</p>
<p dir=3D"auto">I was wondering if you might consider reverting this chan=
ge?
<br>
Alternatively, can you teach me how to override this file
<br>
locally without carrying a diff?</p>
<p dir=3D"auto">I'm asking because this makes life painful for my workflo=
w.</p>
<p dir=3D"auto">Having git clean be able to handle .orig and .rej is incr=
edibly
<br>
handy when applying large patch sets.  It makes finding a rejected
<br>
patch as simple as 'git clean -n | grep rej'.</p>
<br></blockquote></div>
<div class=3D"markdown" style=3D"white-space: normal;">
<p dir=3D"auto">Would =E2=80=98git clean -n -x=E2=80=99 work for you?</p>=

<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; border=
: thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #=
E4E4E4;"><code>   -x
       Don=E2=80=99t use the standard ignore rules (see gitignore(5)), bu=
t still use
       the ignore rules given with -e options from the command line. This=

       allows removing all untracked files, including build products. Thi=
s
       can be used (possibly in conjunction with git restore or git reset=
)
       to create a pristine working directory to test a clean build.
</code></pre>
<p dir=3D"auto">Alternatively, the gitignore(5) man page also mentions th=
at patterns can be listed in</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; border=
: thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #=
E4E4E4;"><code>   =E2=80=A2   Patterns read from $GIT_DIR/info/exclude.

   =E2=80=A2   Patterns read from the file specified by the configuration=
 variable
       core.excludesFile.
</code></pre>
<p dir=3D"auto">So I=E2=80=99d think you can overrule things you don=E2=80=
=99t like from the repo gitignore file in $GIT_DIR/info/exclude or in you=
r global git configuration, especially combined with this:</p>
<pre style=3D"margin-left: 15px; margin-right: 15px; padding: 5px; border=
: thin solid gray; overflow-x: auto; max-width: 90vw; background-color: #=
E4E4E4;"><code>   =E2=80=A2   An optional prefix &quot;!&quot; which nega=
tes the pattern; any matching file
       excluded by a previous pattern will become included again. It is n=
ot
       possible to re-include a file if a parent directory of that file i=
s
       excluded. Git doesn=E2=80=99t list excluded directories for perfor=
mance
       reasons, so any patterns on contained files have no effect, no mat=
ter
       where they are defined. Put a backslash (&quot;\&quot;) in front o=
f the first
       &quot;!&quot; for patterns that begin with a literal &quot;!&quot;=
, for example,
       &quot;\!important!.txt&quot;.
</code></pre>
<p dir=3D"auto">Kristof</p>

</div></div></body>

</html>

--=_MailMate_E4A34644-1547-4932-84FE-3FB51D1FD281_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FC1EDC4-9F20-4271-B468-715A1727AC8A>