Line

ui/client/features/shell/hooks/useGitBranchCount

Cockpit client (features), v0.9. Source: ui/client/features/shell/hooks/useGitBranchCount.tsx.

Functions#

useGitBranchCount()#

useGitBranchCount(projectKnown): number

Defined in: ui/client/features/shell/hooks/useGitBranchCount.tsx:10

How many branches the Git screen has to review (every local branch except the base), for the badge beside "Git" in the top bar. Read once the project is known and again when the window regains focus. 0 when there is nothing to review or the branches cannot be read (not a repository, no project): the badge then stays hidden rather than saying something false.

Parameters#

projectKnown

boolean

Returns#

number