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:
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…
x
Reference in New Issue
Block a user