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

Function useGitCommits

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

Source from the content-addressed store, hash-verified

316 * Hook for commit history
317 */
318export function useGitCommits(repositoryPath: string): {
319 commits: GitCommit[] | undefined;
320 isLoading: boolean;
321 refresh: () => Promise<void>;
322} {
323 const { commits, isLoading, refreshDetailed } = useGitState({
324 repositoryPath,
325 layers: ['detailed'],
326 refreshOnMount: true,
327 debugSource: 'use_git_commits',
328 });
329
330 return {
331 commits,
332 isLoading,
333 refresh: refreshDetailed,
334 };
335}
336
337function shallowEqual(a: any, b: any): boolean {
338 if (a === b) return true;

Callers

nothing calls this directly

Calls 1

useGitStateFunction · 0.85

Tested by

no test coverage detected