From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 0/2] xfsdump whitespace changes
Date: Fri, 9 Nov 2018 12:04:01 +1100 [thread overview]
Message-ID: <20181109010401.GH19305@dastard> (raw)
In-Reply-To: <CACj3i73YfktMZbdicfS5gcgoYpsunZnnzcvMxEhuEHanYs4Xgg@mail.gmail.com>
On Thu, Nov 08, 2018 at 06:39:21PM +0100, Jan Tulak wrote:
> On Mon, Nov 5, 2018 at 10:53 PM Dave Chinner <david@fromorbit.com> wrote:
> >
> > On Mon, Nov 05, 2018 at 01:25:45PM +0100, Jan Tulak wrote:
> > > On Mon, Nov 5, 2018 at 12:48 PM Dave Chinner <david@fromorbit.com> wrote:
> > > >
> > > > On Mon, Nov 05, 2018 at 11:15:34AM +0100, Jan Tulak wrote:
> > > > > On Fri, Nov 2, 2018 at 11:34 PM Dave Chinner <david@fromorbit.com> wrote:
> > > > > >
> > > > > > On Fri, Nov 02, 2018 at 12:43:18PM +0100, Jan Tulak wrote:
> > > > > > > On Fri, Nov 2, 2018 at 2:36 AM Dave Chinner <david@fromorbit.com> wrote:
> > > > > > > > On Thu, Nov 01, 2018 at 12:01:28PM +0100, Jan Tulak wrote:
> > > > > > > > However, it's is the same change as what you originally posted to a
> > > > > > >
> > > > > > > Yes, it is the same thing, with changes where I found something
> > > > > > > misaligned on top.
> > > > > > >
> > > > > > > > git tree, then it needs revision. basically, most of the change was
> > > > > > > > converting vertically aligned function call parameters to use tabs,
> > > > > > > > and that broke the vertical alignment.
> > > > > > >
> > > > > > > It is "s/ /\t/" limited to the beginning of the line.
> > > > > >
> > > > > > You mean 's/^ /\t/'?
> > > > >
> > > > > Yes, but in multiple iterations to get \t, \t\t, \t\t\t, ...
> > > >
> > > > Which is handled by this regex: 's/^\(\t*\)* /\1\t/'
> > > >
> > > > In this case, I'm using "*", which means "match zero or more of the
> > > > preceding expression" - which in this case is \t. That regex is
> > > > enclosed in \(...\) to group the result, which is then back
> > > > referenced in the output expression by \1 (first group backref).
> > > >
> > > > Regexes are extremely and flexible once you've learnt how the
> > > > multiple object matching rules work.
> > >
> > > I know. But I don't see how your regex would take the number of
> > > four-space groups and inserted the same number of \t,
> >
> > I thought you were asking about having multiple tabs preceding
> > the "4 space group". If you simply want to change all 4 space
> > groups, it's 's/\( \)/\t/g':
> >
>
> [snip]
>
> Thanks, but I know regular expressions, even if I usually don't get a
> nontrivial expression on a first try. :-D
>
> Anyway, how about this? I pushed it into a new branch (style-nov-8th)
> https://github.com/jtulak/xfsdump/tree/style-nov-8th
> (git clone --single-branch -b style-nov-8th
> https://github.com/jtulak/xfsdump.git)
>
> It is now in 16 patches, split usually one change at a time. Three of
> them are over 500k in size, so I will need to cut them somehow into
> more parts before sending them into the mailing list.
Split them by dump/restore/inventory/common directories.
> But I ended up
> with a small script set that does it all, including the creation of
> commits, so I don't have to deal with conflicts if I will need to
> change anything.
>
> Btw, I wonder if these formatting scripts could be useful if I push
> them somewhere publicly... About 2/3 are sed replacements, the last
> third are gradually stricter configurations for Uncrustify
> (http://uncrustify.sourceforge.net/, available in distro repos).
The scripts used for the transfomation should be documented in the
the commit messages. e.g:
https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=37b3b4d6c38aaf501dd7714d9670bff4ac282923
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2018-11-09 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 11:01 [PATCH 0/2] xfsdump whitespace changes Jan Tulak
2018-11-01 11:01 ` [PATCH 1/2] xfsdump: remove trailing whitespaces Jan Tulak
2018-11-01 16:46 ` Eric Sandeen
2018-11-02 1:36 ` [PATCH 0/2] xfsdump whitespace changes Dave Chinner
2018-11-02 11:43 ` Jan Tulak
2018-11-02 16:54 ` Jan Tulak
2018-11-02 22:57 ` Dave Chinner
2018-11-05 10:17 ` Jan Tulak
2018-11-02 22:34 ` Dave Chinner
2018-11-05 10:15 ` Jan Tulak
2018-11-05 11:48 ` Dave Chinner
2018-11-05 12:25 ` Jan Tulak
2018-11-05 21:52 ` Dave Chinner
2018-11-08 17:39 ` Jan Tulak
2018-11-09 1:04 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181109010401.GH19305@dastard \
--to=david@fromorbit.com \
--cc=jtulak@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).