Remix.run Logo
sbszllr 10 hours ago

Let's forget that this post is an ad. I feel like there is a use for LLMs that could help us do stacked PRs better.

Right now there are effectively three ways to do a PR:

- a bunch of small commits, some of them related to the feature, some fixes, some mixing both -> a PR with 'n' commits -> they don't really make sense as atomic commits, you have to review the entire PR to make the sense of it

- a squashed PR

- some uber principled reorganisation of commits that separates key implementation concerns into smaller commits (effectively stacked PRs but clean)

The last option would be desirable but it's unreasonable to expect anyone to do it by hand. So this is where <maybe> an LLM could parse my garbage intermediate commits, the final diff and generate a stack instead?

vermilingua 10 hours ago | parent | next [-]

The last option is absolutely not unreasonable to expect people to do by hand, as the article states it’s simply a problem of tooling. JJ makes this extremely easy to do, but some of us have been doing just the same in git for a long time and it is extremely achievable once you know your way around a rebase.

sbszllr 10 hours ago | parent | next [-]

Maybe it just shows my lack of tolerance for process/overhead.

As a fellow rebase enjoyer, I will do it occasionally for smaller PRs but to me, it becomes unwieldy for large ones.

Do you have any tips or aliases that makes it more workable?

vermilingua 9 hours ago | parent [-]

Yep, ensuring RERERE and autostash are enabled eliminate 80% of the tedium for me, but honestly just try jj; it seriously is a gamechanger and (so far, in ~6mth of use) it has had literally zero drawbacks in comparison to git, because it is still git and if I don’t know how to do something with jj, I can use the git commands I do know and it Just Works™

juped an hour ago | parent | prev [-]

It's like switching to jujutsu gives people some kind of mental permission to do this - jujutsu justifies its existence just by that alone, really.

steveklabnik 7 hours ago | parent | prev [-]

I have had good success lately with asking Claude to do your last option. jj also works fantastically for this, because you can easily jj new up a bunch of empty changes with the descriptions you want to have, and then jj restore the state from your original stack into them. If the process goes poorly for any reason, you still have your original stack around.

You don’t have to do it this way, you could use the oplog to undo it all if it’s not to your satisfaction, but it’s much simpler than trying to edit the commits into the right shape directly.