summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJérémy Pagé <contact@jeremypage.me>2021-05-29 22:11:52 +0200
committerJesse Duffield <jessedduffield@gmail.com>2021-05-30 15:29:56 +1000
commitbc044c64b2315c3fb8c523fa0ae7ef71bcba3b31 (patch)
treed525fd09c87c63f2f9ddbedbea6b38eeefe2a665 /pkg
parente478c254d43495ecfa2dad55df1ca2d2726ff974 (diff)
Remove origin prefix when creating local branch based from origin
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/branches_panel.go4
1 files 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{