Re: [GIT PULL] hardening fixes for v6.16-rc1

From: Konstantin Ryabitsev
Date: Sun Jun 01 2025 - 13:49:23 EST


On Sun, Jun 01, 2025 at 10:12:02AM -0700, Linus Torvalds wrote:
> > Yeah, this is danger territory, because you're asking to update a random
> > commit in the tree history.
>
> So the *real* danger territory is lying about committer information.
> That's the thing that *no* standard too should ever do, and what made
> me so upset.
>
> Konstantin, can you please fix b4 to never *ever* rewrite a commit
> that has different committer information than the current user?

Yes, I will add that safety check in for sure. This is one of those scope
creep situations -- the trailers command started out as a way to apply
trailers only to your own curated series, e.g. before submitting a vN+1, but
it was then hacked to also work on arbitrary trees, without properly
considering all possible implications.

> I don't think this is about "39 commits down". This is apparently b4
> just doing plain bad things, adn it would be bad even if it was only
> rewriting the top-most commit.
>
> Setting authorship to somebody else is normal and expected: "author"
> is about giving credit.
>
> But setting *committer* information to somebody else is not about
> giving credit, it's about lying. Tools that do that are broken tools.
>
> I'm also not clear on why apparently the script tries to retain
> committer dates. That's also just plain lying.

It's working as designed, I'm afraid -- git-filter-repo is a powerful tool
for rewriting git history and will happily fire off even when you are pointing
it at your own two feet.

-K