git-local-info
Version:
Retrieve current sha, branch name, repository from a git repo.
21 lines (20 loc) • 500 B
TypeScript
export interface ICommit {
commitMessage?: string;
committer?: string;
}
export interface IGitInfo {
/** The current branch */
branch: string;
/** The current repository url */
repository: string | null;
/** SHA of the current commit */
sha: string;
/** The committer of the current SHA */
commit: ICommit;
/** The commit message for the current SHA */
rootDir: string;
}
export interface IGitInfoParams {
gitPath?: string;
GIT_DIR?: string;
}