Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 439421 - Add support for rebase --preserve-merges
Summary: Add support for rebase --preserve-merges
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 429664
  Show dependency tree
 
Reported: 2014-07-11 06:31 EDT by Konrad Kügler CLA
Modified: 2014-07-15 20:02 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Kügler CLA 2014-07-11 06:31:07 EDT
At the moment rebase (and pull with rebase) always performs a flattening rebase, losing merge commits.

It should be possible to rebase merge commits, keeping their merging nature intact. C Git supports this when the --preserve-merges command line option to git rebase is specified.

C Git preserves merges by simply redoing them, which loses conflict resolutions and other changes that went into the original merge (e.g. compile fixes to adapt to the new branch base). Preferably, JGit should try to rebase merge commits as-is, keeping the changes that went into a merge after automatic merging intact.
Comment 1 Konrad Kügler CLA 2014-07-11 06:33:22 EDT
Proposed implementation: https://git.eclipse.org/r/#/c/29770/
Comment 2 Robin Rosenberg CLA 2014-07-15 20:02:40 EDT
Merged