MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loadDiffData

Function loadDiffData

src/hooks/useDiffData.ts:45–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 let cancelled = false
44
45 async function loadDiffData() {
46 try {
47 // Fetch both stats and hunks
48 const [statsResult, hunksResult] = await Promise.all([
49 fetchGitDiff(),
50 fetchGitDiffHunks(),
51 ])
52
53 if (!cancelled) {
54 setDiffResult(statsResult)
55 setHunks(hunksResult)
56 setLoading(false)
57 }
58 } catch (_error) {
59 if (!cancelled) {
60 setDiffResult(null)
61 setHunks(new Map())
62 setLoading(false)
63 }
64 }
65 }
66
67 void loadDiffData()
68

Callers 1

useDiffDataFunction · 0.70

Calls 2

fetchGitDiffFunction · 0.85
fetchGitDiffHunksFunction · 0.85

Tested by

no test coverage detected