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.
Signature:
export declare function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string): Promise<Map<string, string>>;
Parameters
Parameter | Type | Description |
---|---|---|
rootDirectory | string | The root directory of the Git repository |
additionalRelativePathsToHash | string[] | (Optional) Root-relative file paths to have Git hash and include in the results |
gitPath | string | (Optional) The path to the Git executable |
Returns:
Promise<Map<string, string>>