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

[PATCH/RFC 0/2] rebase: add switches to control todo-list setup

From
Phil Hord <phil.hord@gmail.com>
Date
Apr 22, 2019, 00:07 UTC
Message-ID
<20190422000712.13584-1-phil.hord@gmail.com>
From: Phil Hord <phil.hord@gmail.com>

I have a local patch to rebase--interactive.sh that adds "edit" switches to rebase, permitting me to say, for example,

    git rebase --drop $sha

This command creates a todo-list but drops the mentioned commit from the list by changing the "pick" to "drop". Other switches let me edit or reword a commit in my local history, greatly simplifying my branch grooming workflow.

With the conversion to rebase.c (yay!) my tools are going away. I'm porting them to the rewritten rebase*.c and I want to submit them here. But rebase*.c is still in flux, and my changes have many conflicts with other inflight changes. I'm happy to wait for those, but in the meantime, I'd appreciate some feedback on the utility and acceptability of my plan.

Here's my patch series as it stands today. It lacks documentation and tests, but it mostly works. Errors are not handled gracefully, but this will be rectified after I rebase onto pw/rebase-i-internal-rfc.

Currently it supports these switches:
    usage: git rebase [-i] [options] [--exec <cmd>] ...
       :
    --break <revision>    stop before the mentioned ref
    --drop <revision>     drop the mentioned ref from the todo list
    --edit <revision>     edit the mentioned ref instead of picking it
    --reword <revision>   reword the mentioned ref instead of picking it

I have plans to add these, but I don't like how their "onto" will be controlled. More thinking is needed here.

    --fixup <revision>    fixup the mentioned ref instead of picking it
    --squash <revision>   squash the mentioned ref instead of picking it
    --pick <revision>     pick the mentioned ref onto the start of the list
Phil Hord (2):
  rebase: add switches for drop, edit and reword
  rebase: add --break switch
 builtin/rebase--interactive.c |  49 +++++++++++++++-
 builtin/rebase.c              |  48 ++++++++++++++++
 sequencer.c                   | 105 +++++++++++++++++++++++++++++-----
 sequencer.h                   |  22 ++++++-
 4 files changed, 207 insertions(+), 17 deletions(-)

-- 2.20.1

Next: Phil Hord
Message 1 of 11 in “rebase: add switches to control todo-list setup”
  1. 0/2 rebase: add switches to control todo-list setupPhil Hord, Apr 22, 2019
  2. 1/2 rebase: add switches for drop, edit and rewordPhil Hord, Apr 22, 2019
  3. 2/2 rebase: add --break switchPhil Hord, Apr 22, 2019
  4. Junio C HamanoApr 22, 2019
  5. Phillip WoodApr 22, 2019
  6. Phil HordApr 22, 2019
  7. Phil HordApr 22, 2019
  8. Denton LiuApr 22, 2019
  9. Junio C HamanoApr 23, 2019
  10. Phil HordApr 23, 2019
  11. Phil HordApr 22, 2019

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.