Skip to main content

diff

codebolt.git.diff(commitHash: string, path: string): Promise<any>
Retrieves the diff of changes for a specific commit in the local repository.

Parameters

NameTypeDescription
commitHashstringThe hash of the commit to retrieve the diff for.
pathstringThe file system path of the local Git repository.

Returns:

 Promise<any>
A promise that resolves with the response from the diff event.

Status

Comming soon...

Example


await git.diff('abc123', '/path/to/repo')

Explaination

Shows the difference between the specified commit and the current state of the repository. It has two parameter.

commitHash: A string specifying the commit hash to compare against.

path: A string specifying the local repository path.