Skip to content

@saflib/git


Function: readBlob() ​

readBlob(repoRoot, blobHash): ReturnsError<string, GitCommandError>>

Read a blob's contents by hash without checking anything out. Returns the raw file text (git stores blobs without a trailing newline of its own beyond what the file itself contained).

Parameters ​

ParameterType
repoRootstring
blobHashstring

Returns ​

ReturnsError<string, GitCommandError>