MCPcopy Create free account
hub / github.com/alibaba/open-code-review / readWorkspaceFileForDiff

Function readWorkspaceFileForDiff

internal/diff/workspace_file.go:19–21  ·  view source on GitHub ↗
(repoDir, relPath string)

Source from the content-addressed store, hash-verified

17var errWorkspaceFileTooLarge = errors.New("workspace file exceeds size limit")
18
19func readWorkspaceFileForDiff(repoDir, relPath string) ([]byte, error) {
20 return readWorkspaceFileForDiffWithLimit(repoDir, relPath, 0)
21}
22
23func readWorkspaceFileForDiffWithLimit(repoDir, relPath string, maxSize int64) ([]byte, error) {
24 repoRoot, err := pathutil.CanonicalPath(repoDir)

Calls 1