mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
when in the remote branches view, prefill name for creating branch off of remote branch
This commit is contained in:
parent
bd9579983e
commit
fa2a385a0c
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue