mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-27 00:51:18 +02:00
when in the remote branches view, prefill name for creating branch off of remote branch
This commit is contained in:
@ -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 {
|
if err := gui.GitCommand.NewBranch(response, item.ID()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user