git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (unknown), 
@ 2015-12-16  3:02 David Greene
  2015-12-16  3:02 ` [PATCH] Support rebase --keep-empty and --keep-redundant David Greene
  2015-12-16  5:57 ` (unknown) Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: David Greene @ 2015-12-16  3:02 UTC (permalink / raw)
  To: git; +Cc: john, sandals, peff, gitster


This patch isn't ready for prime-time yet but I wanted to get it out
for some discussion.

While cleaning up and enhancing git-subtree, I've come across the
need to have rebase behave nicely in the case of empty and redundant
commits.  There's a case in pick_one_preserving_merges where
git-cherry pick is used to process the rebase and if cherry-pick
fails, the rebase aborts.  This change does two things:

- If --keep-empty is specified, invoke cherry-pick with --allow-empty.

- If new option --keep-redundant is specified, invoke cherry-pick with
  --keep-redundant-commits.

This allows the rebase to go forward without intrruption in the
included tests.

I will also need a third option that has cherry-pick ignore redundant
commits and remove them from the history.  Unfortunately, I can't
make out exactly how to do that in commit.c, which is where I gather
the cherry-pick stuff happens.  I'll need some help with that if
there's general agreement that this is a useful enhancement.

During the course of developing this, I've encountered some
strange rebase behavior.  I'll send another message about that.

I'd appreciate feedback on this direction and any help with the
cherry-pick stuff.  Thanks!

                         -David

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-18 17:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-16  3:02 (unknown), David Greene
2015-12-16  3:02 ` [PATCH] Support rebase --keep-empty and --keep-redundant David Greene
2015-12-16  5:57 ` (unknown) Junio C Hamano
2015-12-16  8:44   ` (unknown) Patrick Steinhardt
2015-12-18 17:35     ` (unknown) David Greene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).