mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Hide worktree functionality on old git versions
This commit is contained in:
@@ -566,25 +566,32 @@ func (gui *Gui) initGocui(headless bool, test integrationTypes.IntegrationTest)
|
||||
}
|
||||
|
||||
func (gui *Gui) viewTabMap() map[string][]context.TabView {
|
||||
return map[string][]context.TabView{
|
||||
"branches": {
|
||||
{
|
||||
Tab: gui.c.Tr.LocalBranchesTitle,
|
||||
ViewName: "localBranches",
|
||||
},
|
||||
{
|
||||
Tab: gui.c.Tr.RemotesTitle,
|
||||
ViewName: "remotes",
|
||||
},
|
||||
{
|
||||
Tab: gui.c.Tr.TagsTitle,
|
||||
ViewName: "tags",
|
||||
},
|
||||
{
|
||||
branchesTabs := []context.TabView{
|
||||
{
|
||||
Tab: gui.c.Tr.LocalBranchesTitle,
|
||||
ViewName: "localBranches",
|
||||
},
|
||||
{
|
||||
Tab: gui.c.Tr.RemotesTitle,
|
||||
ViewName: "remotes",
|
||||
},
|
||||
{
|
||||
Tab: gui.c.Tr.TagsTitle,
|
||||
ViewName: "tags",
|
||||
},
|
||||
}
|
||||
|
||||
if gui.c.Git().Version.SupportsWorktrees() {
|
||||
branchesTabs = append(branchesTabs,
|
||||
context.TabView{
|
||||
Tab: gui.c.Tr.WorktreesTitle,
|
||||
ViewName: "worktrees",
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
return map[string][]context.TabView{
|
||||
"branches": branchesTabs,
|
||||
"commits": {
|
||||
{
|
||||
Tab: gui.c.Tr.CommitsTitle,
|
||||
|
||||
Reference in New Issue
Block a user