rebase --preserve-merges: keep all merge commits including empty ones
commit986977847e6fb46448fc9c567292ccd2a93d40b3
authorPhil Hord <hordp@cisco.com>
Sat, 12 Jan 2013 20:46:01 +0000 (12 15:46 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jan 2013 17:15:39 +0000 (14 09:15 -0800)
tree0f98417d53fae9b118692e9ad8a1bc62976d5e2c
parent1692579dd3569ebc01187872db91ee2ad93cc962
rebase --preserve-merges: keep all merge commits including empty ones

Since 90e1818f9a  (git-rebase: add keep_empty flag, 2012-04-20)
'git rebase --preserve-merges' fails to preserve empty merge commits
unless --keep-empty is also specified.  Merge commits should be
preserved in order to preserve the structure of the rebased graph,
even if the merge commit does not introduce changes to the parent.

Teach rebase not to drop merge commits only because they are empty.

A special case which is not handled by this change is for a merge commit
whose parents are now the same commit because all the previous different
parents have been dropped as a result of this rebase or some previous
operation.

Signed-off-by: Phil Hord <hordp@cisco.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh