All of lore.kernel.org
 help / color / mirror / Atom feed
* b4 submit ready for beta testing
@ 2022-07-16 14:29 Konstantin Ryabitsev
  2022-07-16 14:43 ` James Bottomley
                   ` (4 more replies)
  0 siblings, 5 replies; 83+ messages in thread
From: Konstantin Ryabitsev @ 2022-07-16 14:29 UTC (permalink / raw)
  To: users, tools

Hello, all:

I've committed the initial b4-submit features to the master branch, and I
need some volunteers to test it. If you routinely send patches to the Linux
kernel mailing lists, then I hope that volunteer is you. :)

## What it does

The goal behind "b4 submit" is simplifying the submitter's workflow by
automating away a lot of menial tasks, such as creating cover letters,
collecting trailers, rerolling new revisions, remembering all the flags to
git-format-patch and git-send-email, etc. The main workflow can be described
like this:

1. b4 submit --new my-new-feature [-f v5.19-rc6]

This will create a new branch called "b4/my-new-feature". If -f is not
specified, the branch will be created from the current HEAD (but this is
rarely what you want, so you'll want to pick a tag to work from).

After the branch is created, b4 will create an empty commit that will serve to
store the cover letter contents and some tracking information. You can view
the raw commit with "git log" just like any other commit, and you can even
edit it with "git rebase" but it's not recommended. It's much better to use
"b4 submit --edit-cover".

2. b4 submit --edit-cover

This allows you to work on the cover letter using $EDITOR or core.editor
as defined in git-config. Once the editing is complete, the empty commit will
be updated and the entire branch rebased using git-filter-repo.

3. use regular git operations for the rest of your work

You can apply, rebase, edit, squash, etc -- just avoid touching the cover
letter commit. You can also push the b4/my-new-feature branch to any remote
and pull it from anywhere else if you want to switch computers.

4. b4 submit --send

When you are ready to send off your series, you can review the resulting
patches by running:

  b4 submit --send --dry-run

or

  b4 submit --send -o /tmp/somedir

The first will print out the patches to send on stdout, exactly as they would
be fed to the SMTP server, and the second will output the patches into the
specified directory a-la git-format-patch -- useful for running "checkpatch"
or any other checks, as necessary.

When you are satisfied that the patches are looking sane, you can fire off the
actual --send command.

NOTE: when we find a scripts/get_maintainer.pl in the repo toplevel, we will
automatically run the most-recommended (that I could find) combination of
flags to automatically populate the To: and Cc: list in addition to whatever
we get out of the cover letter and commit trailers. You can turn this off with
--no-auto-to-cc.

NOTE: at this time, a working SMTP server and a valid [sendemail] section are
required for sending patches. The web submission endpoint work is not yet
completed.

5. b4 submit --reroll

After you send your series and when you're ready to start working on a new
revision, you'll want to --reroll to increment your tracked version. This will
automatically update the cover letter commit to add a "Changes in v[N]"
section that will also contain a link to the v[N-1] series, creating a
historical breadcrumb of revisions.

6. b4 submit --update-trailers [--signoff]

As you receive feedback on your patches, you can retrieve any received
trailers from lore.kernel.org and apply them directly to your branch. This is
accomplished by retrieving any threads matching the unique "change-id"
submitted as part of the cover letter.

One thing to keep in mind here is that actual trailer matching is done by
comparing the patch-id (see git-patch-id for details). This has the following
important bonuses and caveats:

  - You can rearrange patches or modify summaries without it affecting the
    match.
  - If you modify actual code (even as much as fixing a typo in a string), any
    received trailers will no longer match. This is as designed, because if
    you change the code, it's no longer reviewed (but we won't remove any
    existing trailers that were already applied).
  - when you use --signoff, this will move your own "Signed-off-by" trailer
    below any other trailers in all series commits, which is commonly
    recommended for the chain-of-custody purposes.

7. b4 submit --send

GOTO 4.

In addition to the above, please see "b4 submit --help" for other flags you
can use with these operations.

### Editing the cover letter commit manually

If you ever need to edit the cover letter commit manually (e.g. to fix
something about the tracking section json), you can use regular "git rebase
-i" with the "reword" action. When rebase bails complaining about the empty
commit, just run "git commit --amend --allow-empty" to edit the cover letter
and then "git rebase --continue".

Again, this is not recommended and it's best to always use "b4 submit
--edit-cover".

## Getting the b4 dev version

To install the b4 development version, you will need to run it from the git
checkout:

  git clone https://git.kernel.org/pub/scm/utils/b4/b4.git
  cd b4
  git submodule update --init
  alias b4="$PWD/b4.sh"

You can find out more details in the README file. You will also want to make
sure that git-filter-repo is installed (either from your distro packages or
from pip).

If you're already running b4 from the git checkout, make sure you run "git
submodule update" to pull in the latest unreleased patatt version.

## Feedback

I hope you have a positive experience using b4 submit. I will be happy to
receive any feedback, as I have to make a lot of assumptions and they aren't
always the right ones. :) The best place for this feedback is on the
tools@linux.kernel.org list.

Best regards,
Konstantin


^ permalink raw reply	[flat|nested] 83+ messages in thread

end of thread, other threads:[~2022-08-19 21:00 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 14:29 b4 submit ready for beta testing Konstantin Ryabitsev
2022-07-16 14:43 ` James Bottomley
2022-07-16 14:56   ` Konstantin Ryabitsev
2022-07-16 16:10     ` Junio C Hamano
2022-07-16 16:55     ` James Bottomley
2022-07-16 17:14       ` Conor Dooley
2022-07-17 15:43         ` Konstantin Ryabitsev
2022-07-18 18:14           ` Jason Gunthorpe
2022-07-18 18:34             ` Luck, Tony
2022-07-17 16:02       ` Konstantin Ryabitsev
2022-07-18 18:17         ` Jason Gunthorpe
2022-07-18 20:28           ` Geert Uytterhoeven
2022-07-18 23:10             ` Jason Gunthorpe
2022-07-19  7:02               ` Geert Uytterhoeven
2022-07-19 12:09                 ` Mark Brown
2022-07-19 12:28                   ` Geert Uytterhoeven
2022-07-20 13:06                     ` Sudeep Holla
2022-07-19 12:44                   ` James Bottomley
2022-07-19 12:51                     ` Geert Uytterhoeven
2022-07-19 13:11                     ` Michael S. Tsirkin
2022-07-19 14:14                     ` Mark Brown
2022-07-19 12:34                 ` Jason Gunthorpe
2022-07-19 12:47                   ` Geert Uytterhoeven
2022-07-19 13:00                     ` Jason Gunthorpe
2022-07-19 13:16                       ` Geert Uytterhoeven
2022-07-19 13:59                       ` Maxime Ripard
2022-07-19 15:32                         ` Jason Gunthorpe
2022-07-19 16:07                           ` Konstantin Ryabitsev
2022-07-19 16:18                           ` Rob Herring
2022-07-19 13:01           ` James Bottomley
2022-07-19 15:34             ` Jason Gunthorpe
2022-07-19 15:38               ` James Bottomley
2022-07-19 15:47                 ` Jason Gunthorpe
2022-07-25 12:16         ` Michael S. Tsirkin
2022-07-17  9:58     ` Geert Uytterhoeven
2022-07-17 15:40       ` Konstantin Ryabitsev
2022-07-18  8:49 ` Maxime Ripard
2022-07-18 12:38   ` Paolo Bonzini
2022-07-18 18:20     ` Jason Gunthorpe
2022-07-18 18:26       ` Konstantin Ryabitsev
2022-07-18 14:33   ` Konstantin Ryabitsev
2022-07-18 15:15     ` Maxime Ripard
2022-07-18 17:15 ` Rob Herring
2022-07-18 18:23   ` Konstantin Ryabitsev
2022-07-19 12:23 ` Mattijs Korpershoek
2022-07-19 13:09   ` Konstantin Ryabitsev
2022-07-20 18:48 ` Konstantin Ryabitsev
2022-07-20 19:24   ` Jason Gunthorpe
2022-07-20 19:40     ` Konstantin Ryabitsev
2022-07-20 19:55       ` Jason Gunthorpe
2022-07-20 20:06         ` Konstantin Ryabitsev
2022-07-20 23:13     ` Junio C Hamano
2022-07-20 23:23       ` Linus Torvalds
2022-07-20 23:39         ` Jason Gunthorpe
2022-07-20 23:40           ` Linus Torvalds
2022-07-20 23:42             ` Junio C Hamano
2022-07-21  0:02               ` Jason Gunthorpe
2022-07-21  0:54                 ` Theodore Ts'o
2022-07-21  2:31                   ` Dave Chinner
2022-07-21 13:07                     ` Jason Gunthorpe
2022-07-21 22:49                       ` Dave Chinner
2022-07-22  9:10                         ` Geert Uytterhoeven
2022-07-21  8:48                 ` Geert Uytterhoeven
2022-07-21 13:08                   ` Jason Gunthorpe
2022-07-26  8:37   ` Mattijs Korpershoek
2022-07-26 13:55     ` Paolo Bonzini
2022-07-26 14:06       ` Konstantin Ryabitsev
2022-07-26 14:27     ` Konstantin Ryabitsev
2022-07-26 14:54       ` Mattijs Korpershoek
2022-07-26 20:56         ` Konstantin Ryabitsev
2022-08-18 19:30           ` Conor Dooley
2022-08-18 20:12             ` Conor Dooley
2022-08-18 21:04               ` Konstantin Ryabitsev
2022-08-18 21:22                 ` Conor Dooley
2022-08-19 20:43             ` Konstantin Ryabitsev
2022-08-19 21:00               ` Conor Dooley
2022-07-26 13:11   ` Mattijs Korpershoek
2022-07-26 14:37     ` Konstantin Ryabitsev
2022-07-28 16:04   ` Maxime Ripard
2022-07-28 16:24     ` Konstantin Ryabitsev
2022-08-15 16:17       ` Maxime Ripard
2022-08-15 17:05         ` Konstantin Ryabitsev
2022-08-16  7:39           ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.