Skip to contentSkip to conversation

Allow for "interactive"-like actions in non-interactive rebase

RFE Konstantin Kharlamov 3 participants 4 messages May 3, 2019 – May 7, 2019

lore
Share & tools
lore
#0 lore raw

Interactive rebase (i.e. for example "git rebase -i HEAD~10") is used most often to apply an action to a single commit, e.g. "rename", "edit", "fixup", etc…

As result, people keep coming up with custom scripts and aliases for every distinct action.

Instead, it would be nice to have native support in git to start "rebase" for a given commit, and pass the "interactive action" to use on that commit. Examples:

$ git rebase -i HEAD~10 --action edit
$ git rebase -i HEAD~10 --action rename
$ git rebase -i HEAD~10 --action fixup
#1 lore raw

Hi,

Quoted 9 lines · Konstantin Kharlamov

Interactive rebase (i.e. for example "git rebase -i HEAD~10") is used most often to apply an action to a single commit, e.g. "rename", "edit", "fixup", etc…

As result, people keep coming up with custom scripts and aliases for every distinct action.

Instead, it would be nice to have native support in git to start "rebase" for a given commit, and pass the "interactive action" to use on that commit.

I would totally use this. The equivalent workflow right now is a pretty large number of steps for, say, fixing a typo.

Quoted 5 lines

Examples:

$ git rebase -i HEAD~10 --action edit
$ git rebase -i HEAD~10 --action rename
$ git rebase -i HEAD~10 --action fixup

Is there an alternative to any of these actions that can already be taken individually? Or, another way of asking, were the interactive rebase commands based on some other Git command which could be pain to do on many commits individually?

Emily

#2 lore raw
Quoted 8 lines · Emily Shaffer
Quoted 7 lines · Konstantin Kharlamov

Interactive rebase (i.e. for example "git rebase -i HEAD~10") is used most often to apply an action to a single commit, e.g. "rename", "edit", "fixup", etc…

Instead, it would be nice to have native support in git to start "rebase" for a given commit, and pass the "interactive action" to use on that commit.

Quoted 6 lines
Quoted 3 lines
$ git rebase -i HEAD~10 --action edit
$ git rebase -i HEAD~10 --action rename
$ git rebase -i HEAD~10 --action fixup

I would totally use this. The equivalent workflow right now is a pretty large number of steps for, say, fixing a typo.

Isn't this pretty much what Phil Hord's RFC patch series[1] was about? However, Junio outlined[2] a generalization of that approach providing more flexibility and control.

[1]: https://public-inbox.org/git/[email protected]/
[2]: https://public-inbox.org/git/[email protected]/

#3 lore raw
Quoted 22 lines · Eric Sunshine
Quoted 13 lines · Emily Shaffer
Quoted 1 line · Konstantin Kharlamov

Interactive rebase (i.e. for example "git rebase -i HEAD~10") is

used most

Quoted 1 line

often to apply an action to a single commit, e.g. "rename",

"edit", "fixup",

Quoted 3 lines

etc…

Instead, it would be nice to have native support in git to start

"rebase"

Quoted 1 line

for a given commit, and pass the "interactive action" to use on

that commit.

Quoted 1 line
Quoted 7 lines
Quoted 3 lines
$ git rebase -i HEAD~10 --action edit
$ git rebase -i HEAD~10 --action rename
$ git rebase -i HEAD~10 --action fixup

I would totally use this. The equivalent workflow right now is a
pretty
large number of steps for, say, fixing a typo.

Quoted 6 lines

Isn't this pretty much what Phil Hord's RFC patch series[1] was about? However, Junio outlined[2] a generalization of that approach providing more flexibility and control.

[1]: https://public-inbox.org/git/[email protected]/
[2]: https://public-inbox.org/git/[email protected]/

Thanks, indeed it is. I replied on the corresponding emails.