public inbox for tools@linux.kernel.org
 help / color / mirror / Atom feed
* B4 errors after changing git author
@ 2026-02-07 16:09 Liam Mitchell
  2026-02-09 18:29 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Liam Mitchell @ 2026-02-07 16:09 UTC (permalink / raw)
  To: tools

Hi, I encountered unhelpful errors while using b4.

The following commands worked fine:
$ b4 prep -n bcm5974-reset -f v6.18
$ git cherry-pick 52007b920a7b
$ b4 prep --edit-cover

While editing the cover letter, I noticed the author email was wrong
and updated in git config and the latest commit:
$ git config user.email mitchell.liam@gmail.com
$ git commit --amend --reset-author

Notice I didn't update the author in the cover letter commit, only the
cherry-picked commit.
The next commands failed with unhelpful errors.

$ b4 prep --auto-to-cc
Will collect To: addresses using get_maintainer.pl
Will collect Cc: addresses using get_maintainer.pl
Traceback (most recent call last):
  File "/usr/bin/b4", line 8, in <module>
    sys.exit(cmd())
             ~~~^^
  File "/usr/lib/python3.14/site-packages/b4/command.py", line 417, in cmd
    cmdargs.func(cmdargs)
    ~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/b4/command.py", line 83, in cmd_prep
    b4.ez.cmd_prep(cmdargs)
    ~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/b4/ez.py", line 2907, in cmd_prep
    auto_to_cc()
    ~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/b4/ez.py", line 2731, in auto_to_cc
    tos, ccs, tag_msg, patches = get_prep_branch_as_patches()
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/b4/ez.py", line 1518, in
get_prep_branch_as_patches
    prefixes += tracking['series'].get('prefixes', list())
                ~~~~~~~~^^^^^^^^^^
KeyError: 'series'

$ b4 prep --edit-cover
CRITICAL: This is not a prep-managed branch.

I figured out that the cover letter author was the problem and fixed it with:
$ git rebase --reset-author v6.18

A more helpful error message could help the next person who stumbles into this.

Thanks,
Liam

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

* Re: B4 errors after changing git author
  2026-02-07 16:09 B4 errors after changing git author Liam Mitchell
@ 2026-02-09 18:29 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2026-02-09 18:29 UTC (permalink / raw)
  To: Liam Mitchell; +Cc: tools

On Sat, Feb 07, 2026 at 05:09:26PM +0100, Liam Mitchell wrote:
> The following commands worked fine:
> $ b4 prep -n bcm5974-reset -f v6.18
> $ git cherry-pick 52007b920a7b
> $ b4 prep --edit-cover
> 
> While editing the cover letter, I noticed the author email was wrong
> and updated in git config and the latest commit:
> $ git config user.email mitchell.liam@gmail.com
> $ git commit --amend --reset-author

Yes, this is a corner-case we don't handle right now.

> $ b4 prep --edit-cover
> CRITICAL: This is not a prep-managed branch.
> 
> I figured out that the cover letter author was the problem and fixed it with:
> $ git rebase --reset-author v6.18
> 
> A more helpful error message could help the next person who stumbles into this.

Noted. This is a rare enough situation, thankfully, but we should do a quick
sanity check for all command before we attempt many operations.

-- 
KR

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

end of thread, other threads:[~2026-02-09 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-07 16:09 B4 errors after changing git author Liam Mitchell
2026-02-09 18:29 ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox