fix(dev-infra): don't pollute standard out during commit message hooks (#42871)

When a commit message is not restored, there is not need to log this to
stdout.  It is a better experience to silently succeed.

PR Close #42871
This commit is contained in:
Joey Perrott 2021-07-15 16:22:04 -07:00 committed by Alex Rickabaugh
parent 0ce8f6e62d
commit 53279262be
2 changed files with 0 additions and 2 deletions

View File

@ -21,7 +21,6 @@ import {CommitMsgSource} from './commit-message-source';
*/
export function restoreCommitMessage(filePath: string, source?: CommitMsgSource) {
if (!!source) {
log('Skipping commit message restoration attempt');
if (source === 'message') {
debug('A commit message was already provided via the command with a -m or -F flag');
}

View File

@ -1777,7 +1777,6 @@ function saveCommitMessageDraft(basePath, commitMessage) {
*/
function restoreCommitMessage(filePath, source) {
if (!!source) {
log('Skipping commit message restoration attempt');
if (source === 'message') {
debug('A commit message was already provided via the command with a -m or -F flag');
}