On Sat, Sep 06, 2025 at 02:50:49PM -0400, Konstantin Ryabitsev wrote: > On Sat, Sep 06, 2025 at 08:31:59AM -0700, Linus Torvalds wrote: > > An emailed patch series is *not* a git pull. If you want actual real > > git history, just use git. Using a patch series and shazam for that > > would be *bad*. It's actively worse than just using git, with zero > > upside. > The primary consumer of this are the CI systems, though, like those that plug > into patchwork. In order to be able to run a bunch of tests they need to be > able to apply the patches to a tree, so, in a sense, they do need to recreate > git as much as possible, including the branch point. Well, for CI we often don't exactly care that the patch is applied in the context that the sender sent it, we care more that the patch is applied for testing in the same context where it's going to be applied when merged. The base information is useful and we might want to use it, but we might also not. My flow is to apply things, test and then push to the actual tree if the testing is happy so I'm testing the actual commits that will be pushed if everything goes well. > > No, the upside of a patch series is that it's *not* fixed in stone yet > > - not in history, not in acks, not in actual code. So do *not* > > encourage people to think of it as some second-rate "git history" > > model. It's not, and it would be *BAD* at it. > b4 will tell you if a series applies cleanly to the current tree, but I don't > think we make use of this with `shazam -M` -- we always try to parent it > against the indicated base commit. Is the recommendation then to always try to > use the latest tree and bail out if it doesn't apply? If we're going to automatically pick up the base commit that needs an option to limit what the commits that might be selected are, people don't always send something directly usable. For example with a series that should be split between trees (eg, a driver plus DT updates to add the device to some boards) you might reasonably base off linux-next, that'll get a current tree for everywhere the individual patches should be applied. For example my scripting when it's paying attention to base commits will ignore anything that's not in the history of the branch the tree is targeted at unless I explicitly tell it otherwise.