On Thu, 5 Mar 2020 22:34:29 +0000, Simon Kelley wrote:

> On 05/03/2020 21:05, Geert Stappers wrote:
> > On Thu, Mar 05, 2020 at 09:46:21PM +0100, Geert Stappers wrote:  
> >> Previous-Subject: Re: [Dnsmasq-discuss] Announce: dnsmasq-2.81rc1
> >> In-Reply-To:
> >> <46b01ef6-df07-44ed-86ba-ccbd2efdb...@darbyshire-bryant.me.uk> On
> >> Tue, Mar 03, 2020 at 09:07:15AM +0000, Kevin 'ldir'
> >> Darbyshire-Bryant wrote:  
> >>> On 3 Mar 2020, at 06:31, Geert Stappers <stapp...@stappers.nl>
> >>> wrote:  
> >>>> On Mon, Mar 02, 2020 at 10:39:26PM +0000, Simon Kelley wrote:  
> >>>>>
> >>>>> ... and let me know ... if there are any loose ends I missed.
> >>>>>  
> >>>>
> >>>> In
> >>>> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q1/013757.html
> >>>> is int count, new;
> >>>> -  struct dhcp_config *config, *candidate;
> >>>> +  struct dhcp_config *config, *candidate;
> >>>>   struct hwaddr_config *conf_addr;  
> >>>
> >>> Not sure I understand the relevance Geert but as is common with
> >>> these sort of non obvious replacements, there’s a ‘rogue’ white
> >>> space at the end of the replaced line which is removed by its
> >>> replacement.  
> >>  
> >> Yes, that is the problem:  rogue white space is considered
> >> irrelevant
> >>
> >> I plea for removal of unneeded ' ' and '   '.
> >>
> >> That removal can be done with:
> >>
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc  
> > 
> > Numbers from output of `wc` increased.
> > 
> >   
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc
> >> sed --in-place -e '${/^ *$/d;}' src/*.c ; git diff | wc  
> > 
> > Output of `wc` is stable.
> > 
> > At this point you probably want to do `git diff`
> > and will see that trailing-space-only-lines are removed.
> > 
> >   
> >> sed --in-place -e 's/^[ \t]*$//' src/*.c ; git diff | wc  
> > 
> > Lines that had only spaces or tabs got that white space removed.
> > 
> >    
> >> sed --in-place -e 's/^[ \t]*$//' src/*.c ; git diff | wc
> >> sed --in-place -e 's/^[ \t]*$//' src/*.c ; git diff | wc  
> > 
> > Output of `wc` is stable.
> > 
> > `git diff` is huge, almost 22000 lines.  Yes, a huge clean-up.
> > 
> > 
> > I love to see that in the 2.81 release of dnsmasq.
> > 
> >  git commit -am "Removed useless whitespace" --author "Geert
> > Stappers <stapp...@stappers.nl>"
> > 
> >   
> 
> The obvious problem with doing that is that for ever more, when I run
> "git blame" 22000 lines will have the source "Removed useless
> whitespace".
> 
> I have a feeling someone once posted a solution to that, but I don't
> have time to trawl back and find it. Can anyone help?
> 
Does
git blame -w

do the trick?
Mark
> 
> Simon.
> 
> 

Attachment: pgpYI64PxC56f.pgp
Description: OpenPGP digital signature

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to