mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Only show worktree in status panel if not the main worktree and worktrees are supported
This commit is contained in:
parent
3cd2d6fa5c
commit
a06a5cadee
3 changed files with 26 additions and 5 deletions
|
@ -632,8 +632,12 @@ func (self *RefreshHelper) refreshStatus() {
|
|||
}
|
||||
|
||||
workingTreeState := self.c.Git().Status.WorkingTreeState()
|
||||
mainWorktreeName := self.worktreeHelper.GetMainWorktreeName()
|
||||
status := presentation.FormatStatus(currentBranch, mainWorktreeName, workingTreeState, self.c.Tr)
|
||||
var linkedWorktreeName string
|
||||
if self.c.Git().Version.SupportsWorktrees() {
|
||||
linkedWorktreeName = self.worktreeHelper.GetLinkedWorktreeName()
|
||||
}
|
||||
|
||||
status := presentation.FormatStatus(currentBranch, linkedWorktreeName, workingTreeState, self.c.Tr)
|
||||
|
||||
self.c.SetViewContent(self.c.Views().Status, status)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue