git-client.ts (material2-7.3.6) | : | git-client.ts (material2-7.3.7) | ||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
return this._spawnGitProcess(['checkout', '-b', branchName]).status === 0; | return this._spawnGitProcess(['checkout', '-b', branchName]).status === 0; | |||
} | } | |||
/** Stages all changes by running `git add -A`. */ | /** Stages all changes by running `git add -A`. */ | |||
stageAllChanges(): boolean { | stageAllChanges(): boolean { | |||
return this._spawnGitProcess(['add', '-A']).status === 0; | return this._spawnGitProcess(['add', '-A']).status === 0; | |||
} | } | |||
/** Creates a new commit within the current branch with the given commit messa ge. */ | /** Creates a new commit within the current branch with the given commit messa ge. */ | |||
createNewCommit(message: string): boolean { | createNewCommit(message: string): boolean { | |||
return this._spawnGitProcess(['commit', '-m', message]).status === 0; | // Disable pre-commit hooks when creating a commit. Developers might not hav | |||
e set up | ||||
// their Git configuration for the "git-clang-format" pre-commit hook. | ||||
return this._spawnGitProcess(['commit', '--no-verify', '-m', message]).statu | ||||
s === 0; | ||||
} | } | |||
/** Gets the title of a specified commit reference. */ | /** Gets the title of a specified commit reference. */ | |||
getCommitTitle(commitRef: string): string { | getCommitTitle(commitRef: string): string { | |||
return this._spawnGitProcess(['log', '-n1', '--format="%s"', commitRef]).std out.trim(); | return this._spawnGitProcess(['log', '-n1', '--format="%s"', commitRef]).std out.trim(); | |||
} | } | |||
/** Creates a tag for the specified commit reference. */ | /** Creates a tag for the specified commit reference. */ | |||
createTag(commitRef: string, tagName: string, message: string): boolean { | createTag(commitRef: string, tagName: string, message: string): boolean { | |||
return this._spawnGitProcess(['tag', tagName, '-m', message]).status === 0; | return this._spawnGitProcess(['tag', tagName, '-m', message]).status === 0; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 5 lines changed or added |