public inbox for tools@linux.kernel.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Konstantin Ryabitsev" <konstantin@linuxfoundation.org>
Cc: "Kernel.org Tools" <tools@kernel.org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH b4 v3] ez: allow cleaning multiple branches at once
Date: Thu, 26 Feb 2026 11:01:27 +0100	[thread overview]
Message-ID: <DGOT1XCCB2WG.3GJBE8M8LD46A@bootlin.com> (raw)
In-Reply-To: <177202967796.9138.1869608270063220594@lemur>

Hi,

On Wed Feb 25, 2026 at 3:27 PM CET, Konstantin Ryabitsev wrote:
> On Wed, 25 Feb 2026 13:59:48 +0100, Antonin Godard <antonin.godard@bootlin.com> wrote:
>> Allow "b4 prep --cleanup" to cleanup multiple branches in one go. If an
>> error occurs (branch not known/empty branch/currently checked out), just
>> return to continue cleaning up branches. Give the user multiple options:
>> "y" to cleanup, "n" to skip, "q" to abort the cleanup, "s" to show
>> the branch log with diffs, and "?" to print help about these options.
>> 
>> Passing nothing to --cleanup still shows the available branches to
>> cleanup.
>
> I have a few tiny notes, but I hope we can get them addressed. :)
>
>> -    mybranch = param
>> -    if not b4.git_branch_exists(None, mybranch):
>> -        logger.critical('Not a known branch: %s', mybranch)
>> -        sys.exit(1)
>> -    is_prep_branch(mustbe=True, usebranch=mybranch)
>> -    base_commit, start_commit, end_commit = get_series_range(usebranch=mybranch)
>> +    if not is_prep_branch(usebranch=branch):
>> +        logger.error(f'ERROR: {branch} is not a prep-managed branch')
>
> This is a nitpick, but in general it's preferred to use %-formatting for 
> logger calls, because this skips unnecessary interpolation when not 
> needed. So, in this case it should be:
>
>   logger.error('ERROR: %s is not a prep-managed branch', branch)

TIL! I'll send a v4. Thanks.

Antonin

      reply	other threads:[~2026-02-26 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 12:59 [PATCH b4 v3] ez: allow cleaning multiple branches at once Antonin Godard
2026-02-25 14:27 ` Konstantin Ryabitsev
2026-02-26 10:01   ` Antonin Godard [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=DGOT1XCCB2WG.3GJBE8M8LD46A@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tools@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