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

when in the remote branches view, prefill name for creating branch off of remote branch

This commit is contained in:
Jesse Duffield 2020-08-23 17:14:32 +10:00
parent bd9579983e
commit fa2a385a0c

View File

@ -468,7 +468,12 @@ func (gui *Gui) handleNewBranchOffCurrentItem() error {
},
)
return gui.prompt(message, "", func(response string) error {
prefilledName := ""
if context.GetKey() == REMOTE_BRANCHES_CONTEXT_KEY {
// will set to the remote's existing name
prefilledName = item.ID()
}
return gui.prompt(message, prefilledName, func(response string) error {
if err := gui.GitCommand.NewBranch(response, item.ID()); err != nil {
return err
}