Skip to content

Allow rebase onto commit refs in branch commit view#2206

Closed
richard-vock wants to merge 1 commit intojesseduffield:masterfrom
richard-vock:master
Closed

Allow rebase onto commit refs in branch commit view#2206
richard-vock wants to merge 1 commit intojesseduffield:masterfrom
richard-vock:master

Conversation

@richard-vock
Copy link

  • PR Description
    Incomplete PR (see list below).
    Allow to press r in commit view for a local/remote branch only in order to rebase the current branch on top of that commit.
    Note that I reused r since renaming commits makes no sense in the branch view and rebasing onto commits makes no sense in local commits view. This makes the docs a bit confusing though.

  • Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (English only)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

fetchRemote: 'f'
commits:
squashDown: 's'
rebaseCommit: 'r' # only in branch commit view
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should really be one keybinding for rebasing onto a ref. What are your thoughts on us just using branches.rebaseBranch given it already exists? We could create a new keybinding but I don't think it's really necessary.

@jesseduffield
Copy link
Owner

Thanks for making this. It is unfortunate that we're using 'r' to mean different things in two different commits panels, but we do have the precedent of using 'r' for rebasing branches and onto remote branches, so I think if something should change it should be the rename keybinding (which we can worry about later).

All this PR needs now is an integration test. Let me know if you need any help with that

@jesseduffield
Copy link
Owner

I'm closing this due to staleness. I've done a writeup of the issue (#2850) and proposed an alternative solution that supports the keybinding in more views. If you're still keen to do this @richard-vock feel free to open another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants