Re: `b4 prep` "not a prep-managed branch" error with changed Git email

Konstantin Ryabitsev <[email protected]>
Newsgroups org.kernel.linux.tools
Message-ID <177463835932.1517696.6524897957124634278.b4-reply@b4>
On Fri, 27 Mar 2026 16:22:03 +0100, Miguel Ojeda wrote:
> Igor (in Cc) contacted me since he was having a blocking issue with
> `b4 prep` to send a v2 of a patch series. He was consistently getting
> the following error:
> 
>   CRITICAL: This is not a prep-managed branch.
> 
> I don't use the `prep` subcommand myself, but I tried it and couldn't
> reproduce it, so I suggested contacting you with a reproducer, and in
> order to do so, I suggested getting the Git log `--fuller` of the
> branch. Then I noticed he had a different committer than the
> Signed-off-by -- I recalled he was changing his email recently in
> another patch to `MAINTAINERS`.
> 
> And, indeed, if I changed my Git `user.email` I could reproduce the
> issue. In Igor's side, the actual trigger was that for v2 of that
> patch series he was adding an entry to the `.mailmap`, i.e. the
> effective Git user email that appears in `git log` is what counts.
> 
> Is it intended? If so, could perhaps `b4` suggest that may be the
> cause in the error message? (or even check that is indeed the issue)

Yes, it's not intended but it's a known gotcha that I haven't fixed yet.  
It's a side-effect of a guard that I hastily put in place after the time 
when a prep branch got merged into linux-next by accident and broke "b4 
prep" for everyone.

I've added this to the bug tracker now (using the spaking new "b4 bugs"
app) and I'll work to show a better error message and a way to recover 
from this condition.

Thanks,
-- 
KR
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.