Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: rebase should detect identical commits #5381

Open
dotdash opened this issue Jan 16, 2025 · 1 comment
Open

FR: rebase should detect identical commits #5381

dotdash opened this issue Jan 16, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@dotdash
Copy link

dotdash commented Jan 16, 2025

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.

@bnjmnt4n
Copy link
Member

Related issue: #2979.

@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants