From: Dave Marquardt <davemarq@linux.ibm.com>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: tools@kernel.org
Subject: Re: b4: prep --edit-cover emits strange message about "Already Ran"
Date: Fri, 20 Mar 2026 10:50:08 -0500 [thread overview]
Message-ID: <87eclecxfz.fsf@linux.ibm.com> (raw)
In-Reply-To: <4c5b1214-e3ce-4da0-bede-6ee7ab252217@kernel.org> (Matthieu Baerts's message of "Fri, 20 Mar 2026 15:52:54 +0100")
Matthieu Baerts <matttbe@kernel.org> writes:
> Hi Dave,
>
> On 20/03/2026 15:41, Dave Marquardt wrote:
>> I found the message here a little confusing, and had to go code
>> spelunking to figure out what it might mean and how I should answer the
>> Y/N question.
>>
>> $ b4 prep --edit-cover
>> Waiting for Emacs...
>> Invoking git-filter-repo to update the cover letter.
>> The previous run is older than a day (/home/davemarq/linux/linux/.git/worktrees/ibmvfc-fpin-bis/filter-repo/already_ran already exists).
>> See "Already Ran" section in the manual for more information.
>> Treat this run as a continuation of filtering in the previous run (Y/N)? n
>> New history written in 612.22 seconds...
>> Completely finished after 612.53 seconds.
>> Cover letter updated.
>>
>> I first searched the b4 manual, and found nothing about "Already Ran".
>> Eventually, on reading the b4 code in ez.py, I found this was from the
>> git-filter-repo package and I should check its manual. I found the code.
>> There's no way to opt out of this check and message.
>
> Yes, there is: simply by removing the file. That's what b4 is doing for
> a while, and it has been backported in the last stable version (0.14.3):
>
>
> https://git.kernel.org/pub/scm/utils/b4/b4.git/commit/?h=stable-0.14.y&id=e5369681808b
>
> Is it not working on your side? If no, which b4 version are you using?
Okay, I have this code in my local version, and I think I know why it is
not working. This code uses
gtl = b4.git_get_toplevel()
and b4.git_get_toplevel() uses
gitargs = ['rev-parse', '--show-toplevel']
lines = git_get_command_lines(path, gitargs)
But git-filter-repo uses
git_dir = GitUtils.determine_git_dir(b'.')
and that is
d = subproc.check_output('git rev-parse --git-dir'.split(),
cwd=repo_working_dir).strip()
Since I'm using a Git worktree, "git rev-parse --show-toplevel" and "git
rev-parse --git-dir" return different values:
$ git rev-parse --show-toplevel
/home/davemarq/linux/ibmvfc-fpin-bis
$ git rev-parse --git-dir
/home/davemarq/linux/linux/.git/worktrees/ibmvfc-fpin-bis
So the b4 code is looking in the wrong place.
I'll send a patch for this.
-Dave
prev parent reply other threads:[~2026-03-20 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 14:41 b4: prep --edit-cover emits strange message about "Already Ran" Dave Marquardt
2026-03-20 14:52 ` Matthieu Baerts
2026-03-20 15:26 ` Dave Marquardt
2026-03-20 15:50 ` Dave Marquardt [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=87eclecxfz.fsf@linux.ibm.com \
--to=davemarq@linux.ibm.com \
--cc=matttbe@kernel.org \
--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