git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stephen Haberman <stephen@exigencecorp.com>
Date
Oct 8, 2008, 06:41 UTC
Message-ID
<cover.1223445353.git.stephen@exigencecorp.com>

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
Next: Stephen Haberman
Message 1 of 11 in “rebase-i-p: squashing and limiting todo”
  1. rebase-i-p: squashing and limiting todoStephen Haberman, Oct 8, 2008
  2. rebase-i-p: test to exclude commits from todo based on its parentsStephen Haberman, Oct 8, 2008
  3. rebase-i-p: use HEAD for updating the ref instead of mapping OLDHEADStephen Haberman, Oct 8, 2008
  4. rebase-i-p: delay saving current-commit to REWRITTEN if squashingStephen Haberman, Oct 8, 2008
  5. rebase-i-p: fix 'no squashing merges' tripping up non-mergesStephen Haberman, Oct 8, 2008
  6. rebase-i-p: only list commits that require rewriting in todoStephen Haberman, Oct 8, 2008
  7. rebase-i-p: do not include non-first-parent commits touching UPSTREAMStephen Haberman, Oct 8, 2008
  8. rebase-i-p: if todo was reordered use HEAD as the rewritten parentStephen Haberman, Oct 8, 2008
  9. Junio C HamanoOct 8, 2008
  10. Stephen HabermanOct 9, 2008
  11. Stephen HabermanOct 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.