jj icon indicating copy to clipboard operation
jj copied to clipboard

FR: rebase should detect identical commits

Open dotdash opened this issue 10 months ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. I have various old branches for which some commits have been merged to master, or rather, commits with identical changes but with different commit ids (e.g. because they were rebased or the commit message was edited in their PR phase). This is not a problem with git, because it detects identical commits during a rebase and skips them.

git rebase master
...
warning: skipped previously applied commit 40ca019a61
warning: skipped previously applied commit 8effd7177c
...

With jj rebase -d master these commits cause a bunch of conflicts, because they no longer apply cleanly on top of master.

Describe the solution you'd like jj should do the same as git and detect duplicates and drop them (or maybe keep as empty unless --skip-empty is given) rather than creating conflicted changes.

Describe alternatives you've considered Search manually for which changes are actually still needed, which is tedious and error prone.

dotdash avatar Jan 16 '25 18:01 dotdash