From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1807 invoked from network); 4 May 2022 08:21:33 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 4 May 2022 08:21:33 -0000 Received: (qmail 3318 invoked by uid 550); 4 May 2022 08:21:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3277 invoked from network); 4 May 2022 08:21:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1651652443; bh=OZ0wOJsLa8Aj+o/gv8+mAGQ3JfrNtMtLMyQugXBtp3U=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ozBKzFx8jP6XooRtoPHvEWNF1/4cMBLEgq/Q/2HMrSXRLjS7ZUy39CQVmP3atwmO1 SiEUPZPv5nWoa+rtl7jc6S/KsndLP9lZPE/Eb5/8Po6zpS+sKj5aLDglhx0m7XR10a RFJvJdp3L8KQMgyM1JW8u63QAD39yLElGSiq6egQ= X-Virus-Scanned: E-securemail, by Secumail Secumail-id: <12ef7.62723759.d4626.0> DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu A20C427E0491 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1651652441; bh=V4r3WV6lsTagemu1V61r1kW4NyLw8LW68njYeuJ1zI4=; h=Date:From:To:Message-ID:MIME-Version; b=MuTa5BOZlDTWh0JrAEPcTNVH5vUTV4bqS+a400SbYFjJrhmJAJ+bpZziBHvuVV6Uv L17sLHy5tjEqw2f/GchuZDJjf6H44gV9TZtc4f1xSNCMt94Evg+cbPpSvHTbP1sTyo hEGIROJZV2q3IAjOi0jrM6zROjQsUP9oZCY55QD0= Date: Wed, 4 May 2022 10:20:40 +0200 From: Jules Maselbas To: Patrick Oppenlander Cc: musl@lists.openwall.com Message-ID: <20220504082040.GA10082@tellis.lin.mbt.kalray.eu> References: <20220503155655.11222-1-jmaselbas@kalray.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ALTERMIMEV2_out: done Subject: Re: [musl] [PATCH 1/2] tools: Add a script to remove trailing spaces Hi Patrick, On Wed, May 04, 2022 at 04:06:44PM +1000, Patrick Oppenlander wrote: > On Wed, May 4, 2022 at 1:57 AM Jules Maselbas wrote: > > > > Add the remove-trailing-space.sh script, it will only consider files > > tracked by git. Optionaly accept arguments to select the affected path. > > > > Signed-off-by: Jules Maselbas > > --- > > tools/remove-trailing-space.sh | 2 ++ > > 1 file changed, 2 insertions(+) > > create mode 100755 tools/remove-trailing-space.sh > > > > diff --git a/tools/remove-trailing-space.sh b/tools/remove-trailing-space.sh > > new file mode 100755 > > index 00000000..a8b0056a > > --- /dev/null > > +++ b/tools/remove-trailing-space.sh > > @@ -0,0 +1,2 @@ > > +#!/bin/sh > > +git grep '[[:space:]]$' -- $@ | sed 's/:.*//' | uniq | xargs sed -i 's/[[:space:]]\+$//' > > There's a --name-only option you can give to git grep, so I think you > can simplify this to: Thanks, I've looked for this kind of option but failed to found it :) > git grep --name-only '[[:space:]]$' | xargs sed -i 's/[[:space:]]\+$//' This is much better :) > Patrick > >