From b96a071d2e1471f3ba5fc9ae61d160d3bd4556d7 Mon Sep 17 00:00:00 2001 From: herr kaste Date: Sat, 9 Dec 2023 23:46:24 +0100 Subject: [PATCH] Add "Rebase on" to the standard graph menu Standard rebasing is just too common to place it in the rebase menu only. Place it in the standard menu, where we also fetch, push, and pull. --- core/commands/log_graph.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/commands/log_graph.py b/core/commands/log_graph.py index 7948335dd..c4f779542 100644 --- a/core/commands/log_graph.py +++ b/core/commands/log_graph.py @@ -2662,6 +2662,7 @@ def actions_for_single_line(self, view, info, branches): ] actions += [ ("Push", partial(self.push, current_branch)), + ("Rebase on...", partial(self.rebase_on)), SEPARATOR, ] @@ -2863,6 +2864,9 @@ def fetch(self, current_branch): remote = self.get_remote_for_branch(current_branch) self.window.run_command("gs_fetch", {"remote": remote} if remote else None) + def rebase_on(self): + self.window.run_command("gs_rebase_on_branch") + def update_from_tracking(self, remote, remote_name, local_name): # type: (str, str, str) -> None self.window.run_command("gs_fetch", {