[PATCH v2 RFC] rebase-i-p: squashing and limiting todo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is v2 of my attempt at keeping commits with no-parents-being-rewritten off
the rebase-i-p todo list. This was prompted by Avi Kivity's request to squash
commits on either side of a merge, but is something I had wanted as well without
fully realizing it.

Stephan Beyer pointed out his git sequencer branch already does this, contrary
to my incorrect reading of it. His rewrite of rebase-i-p changed how todo was
generated to follow these semantics, and nicely, too, so I replaced my initial
hacky algorithm for "only include commits with rewritten parents" with his.

The better implementation aside, I found Stephan's matching semantics
encouraging as if Avi, myself, and Stephan (plus others/the list involved in
past git sequencer discussions) all expect rebase-i-p to drop non-rewritten
commits, then the semantics should be intuitive and what most users expect.

Also, even though git sequencer has these semantics (and more), I'd like to see
this patch reviewed and applied anyway as I think it is a nice solution to the
current rebase-i-p shortcomings. And, assuming its approved, it can be applied
now instead of waiting for git sequencer to be finished, reviewed, and applied.

This is also my first patch series. I started a new thread--I'm not sure if I
was supposed to use Avi's original message id or not. Also, I cheated and put
the tests in the first commit instead of starting them as test_expect_failure
and gradually changing them to test_expect_success.

Stephen Haberman (7):
  rebase-i-p: test to exclude commits from todo based on its parents
  rebase-i-p: use HEAD for updating the ref instead of mapping OLDHEAD
  rebase-i-p: delay saving current-commit to REWRITTEN if squashing
  rebase-i-p: fix 'no squashing merges' tripping up non-merges
  rebase-i-p: only list commits that require rewriting in todo
  rebase-i-p: do not include non-first-parent commits touching UPSTREAM
  rebase-i-p: if todo was reordered use HEAD as the rewritten parent

 git-rebase--interactive.sh               |   80 ++++++++++++------
 t/t3411-rebase-preserve-around-merges.sh |  136 ++++++++++++++++++++++++++++++
 2 files changed, 190 insertions(+), 26 deletions(-)
 create mode 100644 t/t3411-rebase-preserve-around-merges.sh

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux