Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2022 10:21:11 -0500
From:      Drew Gallatin <gallatin@netflix.com>
To:        Renato Botelho <garga@freebsd.org>
Cc:        Kristof Provost <kp@freebsd.org>, 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:  <CADLQ3s%2BTobfj3r=Bs0ognaZBx844S8S2TRvwK4x=7U2E6q7KeQ@mail.gmail.com>
In-Reply-To: <0a83179a-6bcc-a6e6-7719-28c7b5f2aac1@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> <4f4f6a83-3def-4938-6e40-5460486cc415@FreeBSD.org> <CADLQ3sJhbyCa2KmEKkhfUTPrzCv2nWcjA8CyLdGd-U2wr2ZB%2BQ@mail.gmail.com> <a493e61a-4405-0f5b-655f-d184f30e2be7@FreeBSD.org> <898c0071-66bc-db5f-b70d-72429d167279@FreeBSD.org> <0a83179a-6bcc-a6e6-7719-28c7b5f2aac1@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009cb44805d7bf9e50
Content-Type: text/plain; charset="UTF-8"

Thanks.  IMHO, its still not nearly as good as being able to use standard
tools, and I'd still really prefer the .orig and .rej rules were backed
out..

On Fri, Feb 11, 2022 at 10:17 AM Renato Botelho <garga@freebsd.org> wrote:

> On 11/02/22 12:12, Renato Botelho wrote:
> > On 11/02/22 12:11, Renato Botelho wrote:
> >> On 11/02/22 12:02, Drew Gallatin wrote:
> >>> I think that has the same problem.  Either that, or I'm doing the
> >>> escaping wrong.  Using tcsh:
> >>>
> >>> <10:01am>beast/gallatin:work1>git clean -ne '\!\*.orig'
> >>> Would remove ktrace.out
> >>> <10:01am>beast/gallatin:work1>git clean -xn | grep rej
> >>> Would remove FreeBSD/sys/dev/mlx5/mlx5_en/en_hw_tls.h.rej
> >>
> >> -e expects a pattern of files/directories that you don't want to
> >> remove and can be used multiple times.  It worked here on a testing
> repo:
> >>
> >> sh-3.2$ git clean -xn
> >> Would remove d1/d2/bar.orig
> >> Would remove d1/d2/bar.rej
> >> Would remove foo.orig
> >> Would remove foo.rej
> >>
> >> sh-3.2$ git clean -xn -e '*.rej'
> >> Would remove d1/d2/bar.orig
> >> Would remove foo.orig
> >>
> >> sh-3.2$ git clean -xn -e '*.rej' -e '*.orig'
> >> sh-3.2$
> >>
> >
> > Fat finger here, I was about to say you also can specify what you want
> > to remove using wildcards like:
> >
> > sh-3.2$ git clean -xn '*.orig'
> > Would remove d1/d2/bar.orig
> > Would remove foo.orig
> >
> > sh-3.2$ git clean -xn '*.rej'
> > Would remove d1/d2/bar.rej
> > Would remove foo.rej
> >
>
> And last but not least, if it does what you need, you can create an
> alias to make it simpler:
>
> sh-3.2$ git config --global alias.myclean "clean -xn '*.rej' '*.orig'"
> sh-3.2$ git myclean
> Would remove d1/d2/bar.orig
> Would remove d1/d2/bar.rej
> Would remove foo.orig
> Would remove foo.rej
>
> --
> Renato Botelho
>

--0000000000009cb44805d7bf9e50
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks.=C2=A0 IMHO, its still not nearly as good as being =
able to use standard tools, and I&#39;d still really prefer the .orig and .=
rej rules were backed out..<br></div><br><div class=3D"gmail_quote"><div di=
r=3D"ltr" class=3D"gmail_attr">On Fri, Feb 11, 2022 at 10:17 AM Renato Bote=
lho &lt;<a href=3D"mailto:garga@freebsd.org">garga@freebsd.org</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/02/22 1=
2:12, Renato Botelho wrote:<br>
&gt; On 11/02/22 12:11, Renato Botelho wrote:<br>
&gt;&gt; On 11/02/22 12:02, Drew Gallatin wrote:<br>
&gt;&gt;&gt; I think that has the same problem.=C2=A0 Either that, or I&#39=
;m doing the <br>
&gt;&gt;&gt; escaping wrong.=C2=A0 Using tcsh:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &lt;10:01am&gt;beast/gallatin:work1&gt;git clean -ne &#39;\!\*=
.orig&#39;<br>
&gt;&gt;&gt; Would remove ktrace.out<br>
&gt;&gt;&gt; &lt;10:01am&gt;beast/gallatin:work1&gt;git clean -xn | grep re=
j<br>
&gt;&gt;&gt; Would remove FreeBSD/sys/dev/mlx5/mlx5_en/en_hw_tls.h.rej<br>
&gt;&gt;<br>
&gt;&gt; -e expects a pattern of files/directories that you don&#39;t want =
to <br>
&gt;&gt; remove and can be used multiple times.=C2=A0 It worked here on a t=
esting repo:<br>
&gt;&gt;<br>
&gt;&gt; sh-3.2$ git clean -xn<br>
&gt;&gt; Would remove d1/d2/bar.orig<br>
&gt;&gt; Would remove d1/d2/bar.rej<br>
&gt;&gt; Would remove foo.orig<br>
&gt;&gt; Would remove foo.rej<br>
&gt;&gt;<br>
&gt;&gt; sh-3.2$ git clean -xn -e &#39;*.rej&#39;<br>
&gt;&gt; Would remove d1/d2/bar.orig<br>
&gt;&gt; Would remove foo.orig<br>
&gt;&gt;<br>
&gt;&gt; sh-3.2$ git clean -xn -e &#39;*.rej&#39; -e &#39;*.orig&#39;<br>
&gt;&gt; sh-3.2$<br>
&gt;&gt;<br>
&gt; <br>
&gt; Fat finger here, I was about to say you also can specify what you want=
 <br>
&gt; to remove using wildcards like:<br>
&gt; <br>
&gt; sh-3.2$ git clean -xn &#39;*.orig&#39;<br>
&gt; Would remove d1/d2/bar.orig<br>
&gt; Would remove foo.orig<br>
&gt; <br>
&gt; sh-3.2$ git clean -xn &#39;*.rej&#39;<br>
&gt; Would remove d1/d2/bar.rej<br>
&gt; Would remove foo.rej<br>
&gt; <br>
<br>
And last but not least, if it does what you need, you can create an <br>
alias to make it simpler:<br>
<br>
sh-3.2$ git config --global alias.myclean &quot;clean -xn &#39;*.rej&#39; &=
#39;*.orig&#39;&quot;<br>
sh-3.2$ git myclean<br>
Would remove d1/d2/bar.orig<br>
Would remove d1/d2/bar.rej<br>
Would remove foo.orig<br>
Would remove foo.rej<br>
<br>
-- <br>
Renato Botelho<br>
</blockquote></div>

--0000000000009cb44805d7bf9e50--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLQ3s%2BTobfj3r=Bs0ognaZBx844S8S2TRvwK4x=7U2E6q7KeQ>