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

Function useGitBranches

src/web-ui/src/tools/git/hooks/useGitState.ts:294–313  ·  view source on GitHub ↗
(repositoryPath: string)

Source from the content-addressed store, hash-verified

292
293/** Hook for branch list. */
294export 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

Callers

nothing calls this directly

Calls 1

useGitStateFunction · 0.85

Tested by

no test coverage detected