From: "Greg KH" <greg@kroah.com>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: users@linux.kernel.org, tools@linux.kernel.org
Subject: Re: [kernel.org users] b4 can now explode a pull request into an mbox file with patches
Date: Fri, 27 Mar 2020 12:48:24 +0100 [thread overview]
Message-ID: <20200327114824.GB1738094@kroah.com> (raw)
In-Reply-To: <20200326221926.jfsbtvnb7bfjahov@chatter.i7.local>
On Thu, Mar 26, 2020 at 06:19:26PM -0400, Konstantin Ryabitsev wrote:
> Hi, all:
>
> While working on "pull-request exploder" stuff for achiving on
> lore.kernel.org, I realized that this may be a useful set of features
> for developers as well, as I imagine you sometimes want to comment on
> something in a pull request and end up having to go hunting for the
> proper commit, from/to/cc, etc information.
>
> So, the master branch of b4 just landed initial "b4 pr" implementation,
> which will let you do "b4 pr --explode <msgid>" to get an mbox file
> with that pull request converted into a patch series with various
> headers set so it's convenient to fire off "mutt -f" and reply to the
> exact bits that you want and send it to the proper places.
>
> In more details:
>
> b4 pr <msgid>
>
> - downloads that message
> - parses the pull request
> - checks that the remote tip is where the message says it should be
> - makes sure the base-commit is present in the tree
> - makes sure the tip commit isn't already in one of the branches
> - checks if FETCH_HEAD already is at that commit
> - if all looks good, performs a git fetch
> - (optionally, can then do a checkout into a branch for you)
>
> b4 pr --check <msgid>
>
> Runs all of the checks above, but doesn't perform the actual fetch.
> Useful if you don't remember if you've already processed a pull
> request or not.
>
> b4 pr --explode <msgid>
>
> Runs basic sanity checks and then:
>
> - performs a git fetch
> - runs a "git format-patch" for base-commit..FETCH_HEAD
> - adds the same to/from/cc headers as in the pull request
> - properly threads each patch below the pull request
> - saves that into a <msgid>.mbox file
>
> I mostly imagine that it's the --explode functionality that you'd be
> interested in, but since that required writing most of the other
> pull-request handling functionality, there's basic handling for that as
> well.
>
> Please let me know if that is useful.
Both sound really useful, thanks!
Now to just wait for someone to send me a pull request so I can try it
out, I just had caught up on all of them last night :)
greg k-h
next prev parent reply other threads:[~2020-03-27 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 22:19 b4 can now explode a pull request into an mbox file with patches Konstantin Ryabitsev
2020-03-27 11:48 ` Greg KH [this message]
2020-03-31 2:06 ` [tools] [kernel.org users] " Konstantin Ryabitsev
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=20200327114824.GB1738094@kroah.com \
--to=greg@kroah.com \
--cc=konstantin@linuxfoundation.org \
--cc=tools@linux.kernel.org \
--cc=users@linux.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).