From nobody Fri Feb 11 15:21:11 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 22D4719C3223 for ; Fri, 11 Feb 2022 15:21:25 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JwHQD3SPsz3CTr for ; Fri, 11 Feb 2022 15:21:24 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: by mail-ed1-x531.google.com with SMTP id g7so991636edb.5 for ; Fri, 11 Feb 2022 07:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qeW6g/cN39vIto7EQcyEv5m+YtM3pTOStn/TVPq/3ak=; b=Eeo7f14nry5X5E8mXzcfPsBJ+GwxkIkZAOUg4vQkLl0F2H0NdHChybongKJ4iZP2yO Ai9Nj40BBWzSM4Hk5tV8B4oktHt9aDag6fHK4tNTc9sqk3azTO5BWMLcUjP+JFsa71MO oX2I+5W0b/3S9s4z4tLOhkTq4ToOhXXjrktsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qeW6g/cN39vIto7EQcyEv5m+YtM3pTOStn/TVPq/3ak=; b=LuqfXHpB1gVDjV1FD19o1daqzwLCJtyv6ySa4eddFJYYmQxMEGvrvZNPSjkA9ytQ8J ntik5mshWBCCLPDQoO7An7ayho7yVLSDPJjr5I42uaBgDUcBTR8ZXsPgtmZYuS6K2xK+ 21IbbWLmf0aSXcArE3mXxzv9QVlbQ9QhBeX5GrGdyduUX7HbyStmE6ae5IT3EaENH5wA C090V3ekte0DPVZpab+AxxUNERYICb0ykqdGsJSTShHkoyG/4vCf4aqUhgAhc+aXb6Kd Wddmz6iEYxwl5oJFUAlhHCubUBvEV/eaw5gtFOdukmbhYKKydl/k5J+dU+Yp1QfSzG1W 8SvQ== X-Gm-Message-State: AOAM533sI0TIak4FggJPyaCMl+fj8Rw+JUienC6u2QCZsuHKstnrAAat HYM1pzoH+cQtEXG7+Nc644+r/BjR19t0vJ16W0j5 X-Google-Smtp-Source: ABdhPJxzur2qe6hXWYTafYEOvXRaIr3PFaB0Ze/qLrI5ZAidHi6+Dcau4Wdvxkjv0y6dB9KKLlfyzj3c1PeBgI4JScI= X-Received: by 2002:a50:c30c:: with SMTP id a12mr1930732edb.194.1644592883313; Fri, 11 Feb 2022 07:21:23 -0800 (PST) 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 References: <202201170935.20H9ZM3T069547@gitrepo.freebsd.org> <72061959-88f8-d2ee-b4e9-f09ca084411e@cs.duke.edu> <4FC1EDC4-9F20-4271-B468-715A1727AC8A@FreeBSD.org> <4f4f6a83-3def-4938-6e40-5460486cc415@FreeBSD.org> <898c0071-66bc-db5f-b70d-72429d167279@FreeBSD.org> <0a83179a-6bcc-a6e6-7719-28c7b5f2aac1@FreeBSD.org> In-Reply-To: <0a83179a-6bcc-a6e6-7719-28c7b5f2aac1@FreeBSD.org> From: Drew Gallatin Date: Fri, 11 Feb 2022 10:21:11 -0500 Message-ID: Subject: Re: git: b1f7154cb125 - main - gitignore: ignore vim swap files & .rej/.orig To: Renato Botelho Cc: Kristof Provost , 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-Type: multipart/alternative; boundary="0000000000009cb44805d7bf9e50" X-Rspamd-Queue-Id: 4JwHQD3SPsz3CTr X-Spamd-Bar: -------------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=netflix.com header.s=google header.b=Eeo7f14n; dmarc=pass (policy=reject) header.from=netflix.com; spf=pass (mx1.freebsd.org: domain of gallatin@netflix.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=gallatin@netflix.com X-Spamd-Result: default: False [-14.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[netflix.com:s=google]; FREEFALL_USER(0.00)[gallatin]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; NEURAL_HAM_SHORT(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[netflix.com:+]; DMARC_POLICY_ALLOW(-0.50)[netflix.com,reject]; RCPT_COUNT_SEVEN(0.00)[9]; WHITELIST_DMARC(-7.00)[netflix.com:D:+]; MLMMJ_DEST(0.00)[dev-commits-src-all]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::531:from]; WHITELIST_SPF_DKIM(-3.00)[netflix.com:d:+,netflix.com:s:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --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 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
Thanks.=C2=A0 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 Bote= lho <garga@freebsd.org> wrot= e:
On 11/02/22 1= 2: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.=C2=A0 Either that, or I'= ;m doing the
>>> escaping wrong.=C2=A0 Using tcsh:
>>>
>>> <10:01am>beast/gallatin:work1>git clean -ne '\!\*= .orig'
>>> Would remove ktrace.out
>>> <10:01am>beast/gallatin:work1>git clean -xn | grep re= j
>>> 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.=C2=A0 It worked here on a t= esting 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' &= #39;*.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--