Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/package-deps-hash > getRepoStateAsync

getRepoStateAsync() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the object hashes for all files in the Git repo, combining the current commit with working tree state. Uses async operations and runs all primary Git calls in parallel.


export declare function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string): Promise<Map<string, string>>;


rootDirectorystringThe root directory of the Git repository
additionalRelativePathsToHashstring[](Optional) Root-relative file paths to have Git hash and include in the results
gitPathstring(Optional) The path to the Git executable


Promise<Map<string, string>>