(repositoryPath: string)
| 292 | |
| 293 | /** Hook for branch list. */ |
| 294 | export function useGitBranches(repositoryPath: string): { |
| 295 | branches: GitBranch[] | undefined; |
| 296 | currentBranch: string | null; |
| 297 | isLoading: boolean; |
| 298 | refresh: () => Promise<void>; |
| 299 | } { |
| 300 | const { branches, currentBranch, isLoading, refreshDetailed } = useGitState({ |
| 301 | repositoryPath, |
| 302 | layers: ['basic', 'detailed'], |
| 303 | refreshOnMount: true, |
| 304 | debugSource: 'use_git_branches', |
| 305 | }); |
| 306 | |
| 307 | return { |
| 308 | branches, |
| 309 | currentBranch, |
| 310 | isLoading, |
| 311 | refresh: refreshDetailed, |
| 312 | }; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Hook for commit history |
nothing calls this directly
no test coverage detected