From bc044c64b2315c3fb8c523fa0ae7ef71bcba3b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Pag=C3=A9?= Date: Sat, 29 May 2021 22:11:52 +0200 Subject: [PATCH] Remove origin prefix when creating local branch based from origin --- pkg/gui/branches_panel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index 450ce87eb..3ffa1c24a 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -505,8 +505,8 @@ func (gui *Gui) handleNewBranchOffCurrentItem() error { prefilledName := "" if context.GetKey() == REMOTE_BRANCHES_CONTEXT_KEY { - // will set to the remote's existing name - prefilledName = item.ID() + // will set to the remote's branch name without the remote name + prefilledName = strings.SplitAfterN(item.ID(), "/", 2)[1] } return gui.prompt(promptOpts{