(
repositoryPath: string,
options: GitBasicInfoOptions = {}
)
| 258 | * Suitable for scenarios like BottomBar that only need branch name |
| 259 | */ |
| 260 | export function useGitBasicInfo( |
| 261 | repositoryPath: string, |
| 262 | options: GitBasicInfoOptions = {} |
| 263 | ) { |
| 264 | return useGitState({ |
| 265 | repositoryPath, |
| 266 | isActive: options.isActive ?? true, |
| 267 | participateInWindowFocusRefresh: options.participateInWindowFocusRefresh ?? false, |
| 268 | layers: ['basic'], |
| 269 | refreshOnMount: options.refreshOnMount ?? true, |
| 270 | refreshOnActive: options.refreshOnActive ?? false, |
| 271 | debugSource: options.debugSource ?? 'use_git_basic_info', |
| 272 | cancelPendingRefreshSources: options.cancelPendingRefreshSources, |
| 273 | }); |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * Hook for file status only |
no test coverage detected