mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Hide worktree functionality on old git versions
This commit is contained in:
@ -242,16 +242,18 @@ func (gui *Gui) resetHelpersAndControllers() {
|
||||
controllers.AttachControllers(context, controllers.NewBasicCommitsController(common, context))
|
||||
}
|
||||
|
||||
for _, context := range []controllers.CanViewWorktreeOptions{
|
||||
gui.State.Contexts.LocalCommits,
|
||||
gui.State.Contexts.ReflogCommits,
|
||||
gui.State.Contexts.SubCommits,
|
||||
gui.State.Contexts.Stash,
|
||||
gui.State.Contexts.Branches,
|
||||
gui.State.Contexts.RemoteBranches,
|
||||
gui.State.Contexts.Tags,
|
||||
} {
|
||||
controllers.AttachControllers(context, controllers.NewWorktreeOptionsController(common, context))
|
||||
if gui.c.Git().Version.SupportsWorktrees() {
|
||||
for _, context := range []controllers.CanViewWorktreeOptions{
|
||||
gui.State.Contexts.LocalCommits,
|
||||
gui.State.Contexts.ReflogCommits,
|
||||
gui.State.Contexts.SubCommits,
|
||||
gui.State.Contexts.Stash,
|
||||
gui.State.Contexts.Branches,
|
||||
gui.State.Contexts.RemoteBranches,
|
||||
gui.State.Contexts.Tags,
|
||||
} {
|
||||
controllers.AttachControllers(context, controllers.NewWorktreeOptionsController(common, context))
|
||||
}
|
||||
}
|
||||
|
||||
controllers.AttachControllers(gui.State.Contexts.ReflogCommits,
|
||||
|
Reference in New Issue
Block a user