MCPcopy Create free account
hub / github.com/GCWing/BitFun / useGitBasicInfo

Function useGitBasicInfo

src/web-ui/src/tools/git/hooks/useGitState.ts:260–274  ·  view source on GitHub ↗
(
  repositoryPath: string,
  options: GitBasicInfoOptions = {}
)

Source from the content-addressed store, hash-verified

258 * Suitable for scenarios like BottomBar that only need branch name
259 */
260export 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

Callers 1

WorkspaceItemFunction · 0.90

Calls 1

useGitStateFunction · 0.85

Tested by

no test coverage detected