1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-02 03:37:14 +02:00

Remove origin prefix when creating local branch based from origin

This commit is contained in:
Jérémy Pagé 2021-05-29 22:11:52 +02:00 committed by Jesse Duffield
parent e478c254d4
commit bc044c64b2

View File

@ -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{