Installation
npm install --save @types/git-parse
Summary
This package contains type definitions for git-parse (https://github.com/wayfair/git-parse#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/git-parse.
export function gitToJs(repoPath: string, options?: GitToJsOptions): Promise<GitCommit[]>;
export function checkoutCommit(pathToRepo: string, hash: string, options?: CheckoutCommmitOptions): Promise<void>;
export function gitPull(pathToRepo: string): Promise<void>;
export function gitDiff(pathToRepo: string, commitHash1: string, commitHash2?: string, file?: string): Promise<string>;
export interface FileModification {
path: string;
linesAdded?: number | undefined;
linesDeleted?: number | undefined;
}
export interface FileRename {
oldPath: string;
newPath: string;
}
export interface GitCommit {
hash: string;
authorName: string;
authorEmail: string;
date: string;
message: string;
filesAdded: FileModification[];
filesDeleted: FileModification[];
filesModified: FileModification[];
filesRenamed: FileRename[];
}
export interface GitToJsOptions {
sinceCommit?: string | undefined;
}
export interface CheckoutCommmitOptions {
force?: boolean | undefined;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 12:02:07 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Piotr Błażejewicz.